Download SECURING OPEN SOURCE VIRTUAL PRIVATE NETWORKS: A
Transcript
99
& Madhusudan, 2000). An example named script with changes highlighted is listed in
Figure 10-3.
# Stop daemons.
echo -n "Shutting down named: "
killproc named
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/named
echo
;;
status)
/usr/sbin/ndc status
exit $?
;;
restart)
$0 stop
$0 start
;;
reload)
/usr/sbin/ndc reload
exit $?
;;
probe)
# named knows how to reload intelligently; we don't want linuxconf
# to offer to restart every time
/usr/sbin/ndc reload >/dev/null 2>&1 || echo start
exit 0
;;
*)
echo "Usage: named {start|stop|status|restart}"
exit 1
esac
exit $RETVAL
Configuration of /etc/rc.d/init.d/named continued
To make certain all DNS activities are logged to the system log, change the line
starting the daemon syslogd to read:
daemon syslogd -a /chroot/int_dns/dev/log -m 0
One last step can be taken to protect the server from spoofing. Modify the
/chroot/int_dns/etc/named.conf file to disable any queries for domains not owned by or