[plug] Default Route/GW Change on ppp0 up/down

weirdo at tigris.org weirdo at tigris.org
Wed Dec 22 11:27:35 WST 2004


I am building a new Gentoo box to eventually be the gateway for my
network. Because I am testing parts of the box while still building it I
need to be able to access the internet when ever it is connected.
Currently it connects through a Windows 2000 machine with ICS on
192.168.0.1. When I'm testing linesrv and other gateway stuff on the new
Gentoo box I need to use the network via ppp0

That means that when ppp0 is down I need the default route/gateway to
point to 192.168.0.1 and when ppp0 is up I need it to point to the
settings that ppp get from the ISP. I don't want the DNS server to change
except for adding the ISP DNS server as a secondary server when ppp0 is
up.

For now I have set 'gateway="eth0/192.168.0.1"' in /etc/conf.d/net to
handle the default gateway.
How can I get ppp to modifiy the gateway when it comes up and to /modify/
[1] /etc/resolv.conf to add the ISP DNS server.

Thanks
Tim
[1] I can get ppp to replace /etc/resolve.conf with a new one on ppp0 up
but that removes my DNS server until ppp0 is down again. I NEED it to keep
my primary DNS server as the first nameserver and add the ISP server as a
secondary server. Otherwise I need it to automatically use a root DNS
server when my Primary server fails to resolve an address. Basically what
can happen is that my Primary DNS server may still try to contact a DNS
server on the internet through a gateway that isn't up even if an internet
connection is avaliable on the gentoo box.





More information about the plug mailing list