|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Network/Internet Questions about internet applications, network configuration, usage (SAMBA, network printing, NFS) |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi
I need to route all traffic from host A via gateway B. I use iproute2: "ip rule add from A lookup B". Is there already existant script where I can put "ip rule add" command or do I have to create my own custom startup script for this? |
|
|||
|
B is not my default router, my default router is C. iproute2 commands let you send traffic from different host or different kinds of traffic through different routers. I can not do this with Yast.
|
|
|||
|
I did a quick grep in the /etc directory and could not find a reference in an existing script. You could create a script to add and remove the command in /etc/sysconfig/network/scripts. Then in /etc/sysconfig/network/if-up.d and if-down.d symbolic links to that scripts.
|
|
||||
|
I did Google a bit about iproute2. It seems to be a replacement for several long existing network configuration statedments that still exist. So in this case I suppose that you use iproute2 to do the same as good old route add. But in that case I do not understand that you do not simply use YaST to configure the route. YaST will place the correct definition in /et/sysconf/network/routes so that it is used at every boot.
Doesn't that work for you?
__________________
Henk van Velden |
|
|||
|
Quote:
|
|
|||
|
Quote:
|
|
||||
|
Quote:
What about an extra script in /etc/init.d/ (based on /etc/init.d/skeleton)? I think the skeleton gives you ideas on how to let it be run after the script network and before other scripts that start services that may rely on it being run earlier.
__________________
Henk van Velden |
![]() |
| Bookmarks |
| Tags |
| iproute2 rule startup |
| Thread Tools | |
| Display Modes | |
|
|