Archive

DHC Pand ADSL Routers

Since I started using a DSL router with a built-in DHCP server I have had problems getting it to provide the DNS servers used by my ISP. It persistently re-wrote /etc/resolv.conf using its own IP address as the nameserver. I had circumvented this by making /etc/resolv.conf immutable but this is not ideal particularly with a laptop which may not be on the same network all the time.

Thanks to the book (The Debian System) recommended by AdamTricket I now have a solution.

It is really quite simple – aptitude install resolvconf, then edit /etc/resolvconf/resolv.conf.d/base and add the nameservers and search path I wanted to use just as though I was editing /etc/resolv.conf.

After taking down the network with ifdown eth0 and then restarting it with ifup eth0 I get my ISP’s two nameservers listed first with the ‘nameserver’ given out by the DSL router as last item in the list, /etc/resolv.conf is now a symlink to /etc/resolvconf/resolv.conf.d/base.

Leave a Reply