

| /var/named/localhost.rev /var/named/localhost.zone /var/named/named.root /etc/named.conf |
| ; localhost. $TTL 3600 @ in soa localhost. postmaster.localhost. ( 2001091801 ;serial 3600 ;refresh 1800 ;retry 604800 ;expiration 3600 ) ;minimum ; in ns localhost. in a 127.0.0.1 |
| ; 0.0.127.in-addr.arpa $TTL 3600 @ in soa localhost. postmaster.localhost. ( 2001091701 ;serial 3600 ;refresh 1800 ;retry 604800 ;expiration 3600 ) ;minimum in ns localhost. 1 in ptr localhost. |
| acl ipasec { 192.168.128.0/24; 127.0.0.1; }; options { directory "/var/named"; pid-file "/var/named/named.pid"; query-source address * port 53; allow-transfer { ipasec; }; auth-nxdomain yes; #auth-nxdomain' option is now 'no'というエラーが出るときなどは明示的にyesにしてあげます。 version ""; }; zone "." { type hint; file "named.ca"; }; zone "localhost" { type master; file "localhost.zone"; allow-update { none; }; }; zone "0.0.127.in-addr.arpa" { type master; file "named.local"; allow-update { none; }; }; zone "jinjin.com" { type slave; file "bak/jinjin.com"; masters { 192.168.128.4; }; }; zone "128.168.192.in-addr.arpa" { type slave; file "bak/jinjin.com.rev"; masters { 192.168.128.4; }; }; logging{ channel config_debug{ file "/var/named/log/config_debug.log" versions 5 size 10m; severity debug 3; print-category yes; print-severity yes; print-time yes; }; channel xfer-in_debug{ file "/var/named/log/xfer-in_debug.log" versions 5 size 10m; severity debug 3; print-category yes; print-severity yes; print-time yes; }; channel xfer-out_debug{ file "/var/named/log/xfer-out_debug.log" versions 5 size 10m; severity debug 3; print-category yes; print-severity yes; print-time yes; }; channel notify_debug{ file "/var/named/log/notify_debug.log" versions 5 size 10m; severity debug 3; print-category yes; print-severity yes; print-time yes; }; channel security_debug{ file "/var/named/log/security_debug.log" versions 5 size 10m; severity debug 3; print-category yes; print-severity yes; print-time yes; }; category config { config_debug; }; category xfer-in { xfer-in_debug; }; category xfer-out { xfer-out_debug; }; category notify { notify_debug; }; category security { security_debug; }; }; |
| domain jinjin.com nameserver 192.168.128.4 nameserver 192.168.128.5 |
| hosts: dns files |
| 77if [ -f /usr/sbin/in.named -a -f /etc/named.conf
]; then 78 echo 'starting internet domain name server.' 79 /usr/sbin/in.named & 80fi |
| 77if [ -f /usr/local/sbin/named -a -f /etc/named.conf
]; then 78 echo 'starting internet domain name server.' 79 /usr/local/sbin/named -u bind & 80fi |
| . /etc/rc.d/init.d/functions . /etc/sysconfig/network [ "${NETWORKING}" = "no" ] && exit 0 [ -f /etc/sysconfig/named ] && . /etc/sysconfig/named [ -f /usr/local/sbin/named ] || exit 0 [ -f /etc/named.conf ] || exit 0 RETVAL=0 prog="named" start() { # Start daemons. echo -n $"Starting $prog: " if [ -n "${ROOTDIR}" -a "x${ROOTDIR}" != "x/" ]; then OPTIONS="${OPTIONS} -t ${ROOTDIR}" fi daemon named -u bind ${OPTIONS} RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/named echo return $RETVAL } stop() { # Stop daemons. echo -n $"Stopping $prog: " killproc named RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/named echo return $RETVAL } rhstatus() { /usr/local/sbin/rndc status return $? } restart() { stop start } reload() { /usr/local/sbin/rndc reload >/dev/null 2>&1 || /usr/bin/killall -HUP named return $? } probe() { # named knows how to reload intelligently; we don't want linuxconf # to offer to restart every time /usr/local/sbin/rndc reload >/dev/null 2>&1 || echo start return $? } case "$1" in start) start ;; stop) stop ;; status) rhstatus ;; restart) restart ;; condrestart) [ -f /var/lock/subsys/named ] && restart ;; reload) reload ;; probe) probe ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|probe}" exit 1 esac exit $? |
| bindでセカンダリDNSとして設定(2001.10.5) |