Hetzner bridged network (OpenVZ)

halperino

New Member
Dec 26, 2015
2
0
1
31
Hello everyone. I've set up proxmox, but I'm having problems with networking. I have 1 additional IP (not a subnet) which I want to use to create a container. Is there anyone who could help me there and give configuration files of both the host and the container?(or a guide how to do that). Would really appreciate that and it might help others also. Here's the information of both the host and the additional container:

Host:
IP: X.X.X.100
GATEWAY: X.X.X.97
NETMASK: 255.255.255.224
BROADCAST: X.X.X.127

Container:
IP: Y.Y.Y.18
GATEWAY: Y.Y.Y.17
NETMASK: 255.255.255.248
BROADCAST: Y.Y.Y.23

Thank you.
 
I need to set up a bridged network (not routed). Here's my /etc/network/interfaces/ on both the host and the container I've created:

Host:

# network interface settings
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
up route add -net X.X.X.96 netmask "Hosts netmask" gw "Hosts gateway" eth0 { Don't know why these 2 lines are there }
# default route to access subnet

auto vmbr0
iface vmbr0 inet static
address "Hosts IP"
netmask "Hosts netmask"
gateway "Hosts gateway"
bridge_ports eth0
bridge_stp off
bridge_fd 0

Container:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address "CT's IP"
netmask "CT's netmask"
network (not sure what I should type here to be honest)
broadcast "CT's broadcast"
gateway "CT's gateway"

Someone please help me there, I'm completely lost, literally checked every website...