-   Linux - Newbie (
-   -   Permanently set "route add" -host and default gw (

sacants 07-09-2003 04:52 AM

Can you permanently set "route add" -host and default gw cmds?
After having a lot of problems trying to get my Mandrake 9.0 machine to see the internet, I've finally worked out that I need to manually set the following two "route" commands every time I connect, after I've connected:

route add -host [primary nameserver IP] dev ppp0
route add default gw [primary nameserver IP]

Any idea how I can make these commands permanent so I don't have to reissue them all the time?

I have tried adding lines to ifcfg-ppp0 with no result.

I could of course be going about this the entirely wrong way but at least this works!

Thanks in advance.


MasterC 07-18-2003 04:04 AM


Well you could place those commands in an rc.local file (check /etc/rc.local or run a search for this file) and they will start at boot up, after everything else has been started, so hopefully that's a good thing ;)


All times are GMT -5. The time now is 04:19 PM.