1 |
Hi all. |
2 |
|
3 |
I need to have some ip policy rules at system startup which isn't depend on |
4 |
any interface. In debian i do this through /etc/network/interfaces - i add |
5 |
needed rules as post-up actions to lo interface. |
6 |
|
7 |
In gentoo i've made postup() in /etc/conf.d/net: |
8 |
|
9 |
postup() |
10 |
{ |
11 |
if [ "${IFACE}" = "lo" ]; then |
12 |
ip rule add priority 32000 table main |
13 |
ip rule add priority 32001 from 77.247.233.224/30 lookup vsd_linknet |
14 |
ip rule add priority 32050 from all lookup customers |
15 |
ip rule add priority 32100 table peering |
16 |
ip rule add priority 32101 iif eth0 lookup up1 |
17 |
ip rule add priority 32101 iif eth0 lookup default |
18 |
ip rule add priority 32200 table ix |
19 |
ip rule del priority 32766 |
20 |
fi |
21 |
return 0; |
22 |
} |
23 |
|
24 |
and done: |
25 |
|
26 |
rc-update add net.lo default |
27 |
|
28 |
Is this the right way to do this? |
29 |
|
30 |
-- |
31 |
Nemanov Oleg |