Re: routing tables with openvz container [message #37810 is a reply to message #37696] |
Sat, 24 October 2009 10:28  |
maratrus
Messages: 1495 Registered: August 2007 Location: Moscow
|
Senior Member |
|
|
Hello Wittiko,
I'm terribly sorry for that big delay.
I do really hope the problem to be solved but if not
just let me share my thoughts:
- It seems that I understand what you want to achieve
-
Quote: |
echo "1 wan" >> /etc/iproute2/rt_tables
ip route add [WAN-NETWORK] dev eth0 src [WAN-IP] table wan
ip route add default via [WAN-GW] dev eth0 table wan
ip rule add from [WAN-IP]/32 table wan
ip rule add to [WAN-IP]/32 table wan
|
Why do you need a default gateway record in wan table? The only case when a wan table is examined according to provided rules is when a network packet is addressed to WAN-IP/32 (a single ip address). So, because WAN-IP/32 is within WAN-NETWORK range, the packet will pass through eth0.
|
|
|