CTs with venet exits with CT0's IP address [message #51828] |
Mon, 12 January 2015 14:07 |
decibel83
Messages: 3 Registered: June 2014
|
Junior Member |
|
|
Hi.
I have some OpenVZ containers on a server hosted by Hetzner, which provides me a failover subnet routed to the public IP address of the server.
This is a problem as I want that containers exit on Internet with their own public IP address, not the CT0's one.
My containers uses venet so I added one IP of the subnet to each container.
Containers are correctly accessible by their own public IP, but the problem is that when they access to Internet they are seen as the public IP of the physical server (CT0).
Could you help me to understand and solve the problem, please?
This is the /etc/network/interfaces file of the physical host:
auto vmbr0
iface vmbr0 inet static
address xxx.x.xxx.168
broadcast xxx.x.xxx.191
netmask 255.255.255.224
gateway xxx.x.xxx.161
bridge_ports eth0
bridge_stp off
bridge_fd 0
up route add -net xxx.x.xxx.160 netmask 255.255.255.224 gw xxx.x.xxx.161 vmbr0
root@ct0:/etc/network# vzlist:
CTID NPROC STATUS IP_ADDR HOSTNAME
9201 73 running xxx.x.xxx.183 container
|
|
|
|
|