Hi all.

I need to have some ip policy rules at system startup which isn't depend on
any interface. In debian i do this through /etc/network/interfaces - i add
needed rules as post-up actions to lo interface.

In gentoo i've made postup() in /etc/conf.d/net:

postup()
{
        if [ "${IFACE}" = "lo" ]; then
                ip rule add priority 32000 table main
                ip rule add priority 32001 from 77.247.233.224/30 lookup 
vsd_linknet
                ip rule add priority 32050 from all lookup customers
                ip rule add priority 32100 table peering
                ip rule add priority 32101 iif eth0 lookup up1
                ip rule add priority 32101 iif eth0 lookup default
                ip rule add priority 32200 table ix
                ip rule del priority 32766
        fi
        return 0;
}

and done:

rc-update add net.lo default

Is this the right way to do this?

-- 
Nemanov Oleg

Reply via email to