2010/08/06

Changing the default resolvers assigned by DHCP

One of my Linux machines get IP address from DHCP Server and as a result, the resolvers are pre-assigned in the file /etc/resolv.conf.   I wanted to use my local DNSSEC-aware resolver @127.0.0.1.  My way of doing this is to add the following in /etc/rc.d/rc.local :

cat /dev/null > /etc/resolv.conf
echo "nameserver 127.0.0.1" >> /etc/resolv.conf
service named restart
rndc flush

No comments: