In a dedicated server with several containers behind NAT, I'm trying to route the output / outbound traffic from one of the containers through a specific virtual interface attached to the main physical interface. Both interfaces have public IPs assigned to them.
The chain would look as follows:
OpenVZ container (10.10.10.2) > Host system (eth0:0; IP:220.127.116.11) > internet
as opposed to the current
OpenVZ container (10.10.10.2) > Host system (eth0; IP:18.104.22.168) > internet
I believe this can be done with an iptables postrouting rule