how to permanently add route?
Hi,
how to permanently add route to routing table? I use "ip route add 192.168.0.9 via 192.168.1.5" and each time I reboot it's gone. thanks |
I used to have to do something like that too, and what I ended up doing was just putting a line in /etc/rc.d/rc.local to do it.
I know that's not the most elegant solution, but it works : ). ~Andrew |
Redhat reads a file called:
/etc/sysconfig/static-routes If you have redhat you can use that if you don't then your distro may have something similar. |
thanks guys,
It looks like it work. I use mandrake. |
Starting 8.0, atleast on Redhat, static-routes is not being used anymore.
You have to add the entry to /etc/sysconfig/networking/devices/ifcfg-eth0.route .... bit flaky here. |
Or use the non elegan solution of the /etc/rc.d/rc.local :)
I use (in that file) this: iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE |
All times are GMT -5. The time now is 11:20 PM. |