I'm trying to configure Debian as a router/gateway on my network with eth0 going to my ISP's modem and eth1 to my LAN.
eth0 needs DHCP so that it gets the proper IP address from my ISP modem, but in using DHCP, I'm also getting my ISP's DNS servers thrown into the /etc/resolv.conf file. I would like to override the ISP provided DHCP servers with OpenDNS servers, but am not having much success. The documentation I found for Debian networking suggests setting the dns-nameservers option like so:
iface eth0 inet dhcp dns-nameservers 126.96.36.199 188.8.131.52
But the /etc/resolv.conf continues to populate with the ISP nameservers. If I edit /etc/resolv.conf and set openDNS servers in the file it is periodically wiped out, presumably by the DHCP lease refreshing itself.
How do I get the OpenDNS nameservers to stick?