I have a dedicated server with 5 ips.
The first one assigned to eth0.
I created a bridge vmbr0 with the same IP as eth0.
Then gave on of my openvz containers one of my available static IPS, but I'm getting no ping.
Is there a guide I can follow for assigning static ips to containers? Is there something I'm not inserting into the BRIDGED PORTS text box that I should be?
With Virtualbox I used to bridge the interface and apply the IP directly to VM.
Using Proxmox 4.1.
I'm putting a public IP on the VM interface and using x.x.x.138 as the gateway.
The first one assigned to eth0.
I created a bridge vmbr0 with the same IP as eth0.
Then gave on of my openvz containers one of my available static IPS, but I'm getting no ping.
Is there a guide I can follow for assigning static ips to containers? Is there something I'm not inserting into the BRIDGED PORTS text box that I should be?
With Virtualbox I used to bridge the interface and apply the IP directly to VM.
Using Proxmox 4.1.
Code:
auto lo
iface lo inet loopback
allow-hotplug eth0
auto eth0
iface eth0 inet static
address x.x.x.138
netmask 255.255.255.248
gateway x.x.x.137
broadcast x.x.x.143
network x.x.x.136
dns-nameservers 127.0.0.1
dns-search hospemex.com
# dns-* options are implemented by the resolvconf package, if installed
auto vmbr0
iface vmbr0 inet static
address 192.168.0.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.0.1/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.0.1/24' -o eth0 -j MASQUERADE
auto vmbr1
iface vmbr1 inet static
address x.x.x.138
netmask 255.255.255.248
bridge_ports none
bridge_stp off
bridge_fd 0
up ip route add x.x.x.139/29 dev vmbr1
up ip route add x.x.x.140/29 dev vmbr1
up ip route add x.x.x.141/29 dev vmbr1
up ip route add x.x.x.142/29 dev vmbr1
Last edited: