1. Store
  2. Apps
  3. Hardware
  4. Support
  5. Solutions

ClearFoundation

Forums
Welcome, Guest
persistence of iproute2 custom rules
(1 viewing) 1 Guest
Go to bottomPage: 1
TOPIC: persistence of iproute2 custom rules
#27659
persistence of iproute2 custom rules 2 Years ago  
Hi,

I am trying to route some traffic using iproute2. The problem I find is that some process keeps resetting the "ip rule" table, so if I have:

[root@someserver /]# ip rule
0: from all lookup 255
32765: from all fwmark 0x1 lookup mytunel
32766: from all lookup main
32767: from all lookup default

After some time, some process (syswatch?) will turn it into:

[root@someserver /]# ip rule
0: from all lookup 255
32766: from all lookup main
32767: from all lookup default

I say I think it's syswatch because when booting the system the list of rules at the very begining is quite longer, until it suddenly is changed to this last one.

Does anyone have a clue where could I look to hardcode my custom rules? I haven't been succesful trying to modify syswatch (maybe I didn't look at the correct piece of code).

Thanks,
Sergi
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#27665
Re: persistence of iproute2 custom rules 2 Years ago  
Are you sure it is syswatch? Could it possibly be a firewall restart causing a reset? If it is a firewall restart causing the problems, put the rules in /etc/rc.d/rc.firewall.local.
Nick Howitt
Platinum Boarder
Posts: 4150
graphgraph
User Online Now Click here to see the profile of this user
The administrator has disabled public write access.
 
#27666
Re: persistence of iproute2 custom rules 2 Years ago  
yes, I think you are right. Seems someone added some rules to the firewall without telling it and that seems to have caused the issue.

I'll put the ip rules right where you said. Thanks.
Sergi
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#27674
Re: persistence of iproute2 custom rules 2 Years ago  
FWIW I also add the following to /etc/rc.d/rc.firewall.local:
Code:

# Log when the firewall restarts
logger -t Firewall restarted


This way I get a "Firewall restarted" message in /var/log/messages every time the firewall restarts. It can be useful for diagnostics.
Nick Howitt
Platinum Boarder
Posts: 4150
graphgraph
User Online Now Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
  get the latest posts directly to your desktop