DHCP Internet and own DNS Server

If you’re running your own DNS Server and your internet connection is using DHCP to get the WAN IP, then you might run into the same problem I have.

I have configured my own LAN DNS-Server on a local IP and configured this in /etc/resolv.conf. Periodically the DHCP Client refreshes the WAN IP, thus overwriting my resolv.conf settings.

This problem can be resolved by adding the following line to your /etc/dhcp3/dhclient.conf file:


interface "eth0" {
prepend domain-name-servers 10.0.0.1;
}

In this way your DNS Client will first add your defined domain-name-server to the list sent from your provider