I have been forced to reinstall Proxmox on my dedicated server at OVH last week and took the opportunity to migrate from 4.4 to 5. Note that I install Proxmox on top of Debian 9.4.
Windows VM, private IP, NAT/PAT works fine.
Debian LXC container, fail-over IP, doesn't work (I can't get it to work ;-).
Host /etc/network/interfaces :
Debian 9.4 LXC container's configuration :
This gives the following /etc/network/interfaces :
And the result is (roulement de tambour) : nothing ! I can't ping the host, I can't ping the gateway and of course even less the outside world. And I cannot find what is wrong with my configuration.
Marc
Windows VM, private IP, NAT/PAT works fine.
Debian LXC container, fail-over IP, doesn't work (I can't get it to work ;-).
Host /etc/network/interfaces :
Code:
auto lo
iface lo inet loopback
iface eno1 inet static
address 94.XXX.XXX.XXX
netmask 255.255.255.0
gateway 94.XXX.XXX.254
# This one is used for a private subnet on which VMs and containers use NAT/PAT to be reachable.
auto vmbr0
iface vmbr0 inet static
address 172.16.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 /sbin/iptables -t nat -A POSTROUTING -s '172.16.0.0/24' -o eno1 -j MASQUERADE
post-up /sbin/iptables -t nat -A PREROUTING -i eno1 -p tcp --dport 10139 -j DNAT --to 172.16.0.101:3389
post-up /sbin/iptables -t nat -A PREROUTING -i eno1 -p tcp --dport 10622 -j DNAT --to 172.16.0.106:22
# First IP failover.
auto vmbr1
iface vmbr1 inet static
address 178.XXX.XXX.XXX
netmask 255.255.255.0
bridge-ports none
bridge-stp off
bridge-fd 0
# Second IP failover.
auto vmbr2
iface vmbr2 inet static
address 91.XXX.XXX.33
netmask 255.255.255.0
bridge-ports none
bridge-stp off
bridge-fd 0
# Third IP failover.
auto vmbr3
iface vmbr3 inet static
address 91.XXX.XXX.95
netmask 255.255.255.0
bridge-ports none
bridge-stp off
bridge-fd 0
Debian 9.4 LXC container's configuration :
Code:
Name : eth0
Mac : 02:00:00:7c:aa:90 (virtual MAC taken from OVH's administration console)
Bridge : vmbr2
IPV4 : 91.XXX.XXX.33/32
Gateway : 94.XXX.XXX.254
IPV6 : none
This gives the following /etc/network/interfaces :
Code:
auto lo
iface lo inet loopback
auto eth0
# dns-nameservers 127.0.0.1 213.186.33.99
# dns-domain mydomain.com
iface eth0 inet static
address 91.XXX.XXX.33
netmask 255.255.255.255
# --- BEGIN PVE ---
post-up ip route add 94.XXX.XXX.254 dev eth0
post-up ip route add default via 94.XXX.XXX.254 dev eth0
pre-down ip route del default via 94.XXX.XXX.254 dev eth0
pre-down ip route del 94.XXX.XXX.254 dev eth0
# --- END PVE ---
And the result is (roulement de tambour) : nothing ! I can't ping the host, I can't ping the gateway and of course even less the outside world. And I cannot find what is wrong with my configuration.
Marc