PPPD senario
Using ppon
and ppoff
probably means you are using pppd
. In which case pon
will execute the script /etc/ppp/ppp_on_boot
. Unless you supply an argument to pon
, it will load settings from /etc/ppp/peers/provider
. If you provide an argument it will say for example pon interwebz
it will look for /etc/ppp/peers/interwebz
. There is also /etc/ppp/options
to check too.
I would imagine that this file contains the setting usepeerdns
. From the pppd man page:
usepeerdns
Ask the peer for up to 2 DNS server addresses. The addresses supplied by the peer
(if any) are passed to the /etc/ppp/ip-up script in the environment variables
DNS1 and DNS2, and the environment variable USEPEERDNS will be set to 1. In
addition, pppd will create an /etc/ppp/resolv.conf file containing one or two
nameserver lines with the address(es) supplied by the peer.
Comment out this option, stop pppd
with poff
, edit your resolv.conf
and then restart your pppd
with pon
and see if that resolves the issue.
eth0 senario
If you edit your interface settings file (/etc/sysconfig/network-scripts/ifcfg-eth0
for eth0), you can see what settings network manager is using.
If you have DHCP running on that interface BOOTPROTO=yes
then you can tell it not to override your DNS settings with PEERDNS=no
. If you are using a static address then you can set your DNS settings with
DNS1="8.8.4.4"
DNS2="8.8.8.8"
SEARCH="yourdomain.com"