#!/bin/bash #################################################################### # Auto install bind # Create Date : 2012-11-28 # Written by :shanks ##################################################
内网dnsserver:172.22.1.121网关:172.22.1.1/19.86.11.27要实现外网可以使用121的dns,在1.1上添加如下防火墙策略iptables -t nat -A PREROUTING -p tcp -d 19.86.11.27 –dport 53 -j DNAT –to 172.22.1.121iptables -t nat -A PREROUTING -p u
写个脚本#!/bin/sh timeout=2 Q=”shanks.pp711.com″ host=”/usr/bin/host” if test -z “$1″ ; then echo “You need to supply a DNS server to check. Quitting” exit; fi SERVER=$1 ERC=`$host -s -W $timeout $Q $SERV
安装yum install bind* -yrndc-confgen -r /dev/urandom -avim /etc/named.confoptions {version “1.1.1″;listen-on port 53 {any;};directory “/var/named/chroot/etc/”;pid-file “/var/named/chroot/var/run/named/n
用djbdns部署缓存dns安装Before installing djbdns, install daemontools 0.70 or above, and install ucspi-tcp.安装daemontoolstar zxf daemontools-0.76.tar.gzcd admin/daemontools-0.76echo gcc -O2 -include /usr/inclu
配置dnsmasq一、安装yum search dnsmasq二、配置vim /etc/dnsmasq.conflisten-address=127.0.0.1strict-ordercache-size=2048#其实dnsmasq的配置有很多项,这里选择这几项只保证了最基本的。listen-address监听地址;strict-order按照/etc/resolv.conf中nameserve
First of all, we set some options regarding the basic server operation like the interface and port on which it should bind, the unprivileged user that should run the service and a PID file:listen-addr
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号