routing tables with openvz container

hec

Renowned Member
Jan 8, 2009
278
18
83
Wien
www.vector-its.at
i hav two interfaces for some containers one for internal network and one for external network

my problem is that the extern interface gateway is the modem of my isp and the internal is my firewall/routing server

so i need two routing tables

i tried this with two routing tables

the problem was that every change in a container was applied to all containers

for example:

i did is this way:

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

any solutions for this problem?