OpenVZ Forum


Home » General » Support » CTs with venet exits with CT0's IP address
CTs with venet exits with CT0's IP address [message #51828] Mon, 12 January 2015 14:07 Go to next message
decibel83 is currently offline  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

Re: CTs with venet exits with CT0's IP address [message #51831 is a reply to message #51828] Wed, 14 January 2015 19:33 Go to previous messageGo to next message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
maybe you are using NAT (masquerade) in CT0?
Re: CTs with venet exits with CT0's IP address [message #51832 is a reply to message #51831] Wed, 14 January 2015 19:35 Go to previous message
decibel83 is currently offline  decibel83
Messages: 3
Registered: June 2014
Junior Member
I haven't configured it, and I have no iptables rules on CT0, so I don't think so.
How i can check if OpenVZ does this?
Previous Topic: Script to Monitor Email Queue in the Container
Next Topic: OpenVZ update
Goto Forum:
  


Current Time: Fri Apr 19 12:16:11 GMT 2024

Total time taken to generate the page: 0.01847 seconds