Search This Blog

Thursday, November 29, 2007

policy routing problem

i have such configuration


ip route add 87.224.167.g1 dev eth1 table ETH1
ip route add default via 87.224.167.g1 dev eth1 table ETH1
ip route add 212.49.121.g2 dev eth3 table ETH3
ip route add default via 212.49.121.g2 dev eth3 table ETH3

iptables -t mangle -A OUTPUT -m owner --uid-owner 108 -j MARK --set-mark 1

ip rule add fwmark 1 pri 100 table ETH3

iptables -t nat -A POSTROUTING -o eth3 -j SNAT --to-source= 212.49.121.g2

echo 0 > /proc/sys/net/ipv4/conf/eth3/rp_filter

ip rule add from 87.224.167.add1 pri 200 table ETH1
ip rule add from 212.49.121.addr2 pri 250 table ETH2


which resolves problem with 2 internet providers andd their routers.

all works fine.

But network 192.168.1.0/24 which is at interface eth2 cannot ping ip addresses of eth1 and eth3 server interfaces.

Can somebody help me resolv this problem? I already spent about month to learn this problem and can't understand how to fix this.

Sorry can be question is tupid and problem resolving will be joke like but i need it :D

Best regards.

Alex

No comments: