![]() |
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. |
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> |
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? |
Try "static-routes" like Stijn147 said not "static_routes".
|
| All times are GMT -5. The time now is 08:45 AM. |