Sunday, June 27, 2010

how to use our custom dns servers with dhcp

You know when you use dhcp and some times by default it receives dns servers from dhcp server which override what you want.  An easy way to overcome this is to add the line below into /etc/dhcp3/dhclient.conf:

prepend domain-name-servers 8.8.8.8, 8.8.4.4;

This will prepend your favourite domain nameservers first before the ones from dhcp server.  (8.8.8.8 and 8.8.4.4 are Google's public dnd servers which I use as an example.)

Tested on Grml 2009.10 (Debian based).

0 comments:

Post a Comment