LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-04-2003, 05:59 AM   #1
filth
LQ Newbie
 
Registered: Apr 2003
Location: New Zealand
Distribution: Redhat 9.0
Posts: 13

Rep: Reputation: 0
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.
 
Old 05-04-2003, 08:23 AM   #2
Stijn147
LQ Newbie
 
Registered: Apr 2003
Posts: 8

Rep: Reputation: 0
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>
 
Old 05-05-2003, 05:20 PM   #3
filth
LQ Newbie
 
Registered: Apr 2003
Location: New Zealand
Distribution: Redhat 9.0
Posts: 13

Original Poster
Rep: Reputation: 0
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?
 
Old 05-05-2003, 05:27 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Try "static-routes" like Stijn147 said not "static_routes".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to save routing table entries? drgowans Linux - Networking 7 02-26-2019 06:16 PM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
Adding entries to route table in C? kuronai Programming 2 04-04-2005 02:42 PM
filter /etc/messages for certain IP table entries don_wombat Linux - Software 0 12-14-2004 03:45 PM
Working with 'route' and unwanted route entries pioniere Linux - Networking 6 02-05-2003 12:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration