[SOLVED] OpenVZ container using public IP with different subnet

paulocoghi

Active Member
Oct 23, 2014
7
0
41
I am still using Proxmox 3.4 (3.4-16/40ccc11c) with OpenVZ and venet, in various servers in OVH. And in a new dedicated server, I cant ping my only container.

The public IP of the HN is 158.69.241.xxx and for the container 149.56.179.xxx

Routing table
Code:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
149.56.179.xxx  0.0.0.0         255.255.255.255 UH    0      0        0 venet0
158.69.241.0    0.0.0.0         255.255.255.0   U     0      0        0 vmbr0
0.0.0.0         158.69.241.254  0.0.0.0         UG    0      0        0 vmbr0

/etc/network/interfaces
Code:
auto lo
iface lo inet loopback

auto vmbr0
iface vmbr0 inet static
        address 158.69.241.xxx
        netmask 255.255.255.0
        broadcast 158.69.241.255
        gateway 158.69.241.254
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

Netfilter configuration
Code:
$ iptables -t nat -L && iptables -t filter -L && iptables -t mangle -L

Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination        

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination        
Chain INPUT (policy ACCEPT)
target     prot opt source               destination        

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination        
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination        

Chain INPUT (policy ACCEPT)
target     prot opt source               destination        

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination        

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
 
Last edited:
I entered in the console of my container and realized that the networking service were not running.

[ Solution ]

Step 1: access the container console with:
Code:
vzctl enter <id>

Step 2: inside it, check the network config with:
Code:
ifconfig -a

Step 3: if venet0:0 doesn't appear, restart your network with:
Code:
service networking restart
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!