LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Route table loses entries (http://www.linuxquestions.org/questions/linux-networking-3/route-table-loses-entries-58056/)

filth 05-04-2003 06:59 AM

Route table loses entries
 
Hi, I recently set up a small home network using a redhat 9.0 machine and iptables as the firewall.
Whenever I add a gateway to route and restart the computer all the changes I have made are gone and Im back to the original route table.
Why does this happen? it also seems to set ip_forward back to the default of 0 as well.

Stijn147 05-04-2003 09:23 AM

The changes you make to the route-table with the commands ifconfig or route will be destroyed when you restart.

Instead change the config files:
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/static-routes

What supposed to come in ifcfg should be clear, in static-routes you put:
eth0 v default gw <ip_default_gateway>

filth 05-05-2003 06:20 PM

It turns out that I dont have a /etc/sysconfig/static_routes file on my system anywhere. I created one with the deafult gateway entry and restarted the system to find that it hadnt updated the routing table.
The ifcfg-eth0 file was defnitely there, but thats not the one i need to change.
Is there any other way of permanently changing the route table?

david_ross 05-05-2003 06:27 PM

Try "static-routes" like Stijn147 said not "static_routes".


All times are GMT -5. The time now is 11:24 PM.