OpenVZ container with different subnet public IP (using venet)

I am using Proxmox 3.4 with OpenVZ and venet. In various servers, everything is working fine.

But 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

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

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

$ 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
0
задан 15 April 2018 в 01:51
1 ответ

С подсказкой Майкла Хэмптона я вошел в консоль своего контейнера и понял, что сетевая служба не работает.

[Решение]

Шаг 1: доступ к консоли контейнера с помощью:

vzctl enter <id>

Шаг 2: внутри него, проверьте конфигурацию сети с помощью:

ifconfig -a

Шаг 3: если venet0: 0 не появляется, перезапустите вашу сеть с помощью:

service networking restart
0
ответ дан 5 December 2019 в 06:10

Теги

Похожие вопросы