Since is tooks awhile for us to reach this working network setup, we want to share in case somebody else need it
The two hosts are in Hetzner; they have only one network card, one public IP address (used by the VM & CT to reach the internet: none of the VM have incoming internet traffic); they are both connected to an Hetzner vSwitch, which is also connected to the Hetzner network cloud (subnet 10.15.200.0/24, gateway 10.15.200.1), where we have a wireguard server that handle VPN with which VPN users are able to connect to all CT and VM.
The VM and CT have IP in 10.15.200.0/24, with gateway either on 10.15.200.201 or 10.15.200.202, so we can move them from one proxmox to the other with no issue.
(it's a working configuration, but with the public IP redacted)
Any advice is welcome, of course:
The two hosts are in Hetzner; they have only one network card, one public IP address (used by the VM & CT to reach the internet: none of the VM have incoming internet traffic); they are both connected to an Hetzner vSwitch, which is also connected to the Hetzner network cloud (subnet 10.15.200.0/24, gateway 10.15.200.1), where we have a wireguard server that handle VPN with which VPN users are able to connect to all CT and VM.
The VM and CT have IP in 10.15.200.0/24, with gateway either on 10.15.200.201 or 10.15.200.202, so we can move them from one proxmox to the other with no issue.
(it's a working configuration, but with the public IP redacted)
Any advice is welcome, of course:
Bash:
auto lo
iface lo inet loopback
iface enp5s0 inet manual
mtu 1400
post-up echo 1 > /proc/sys/net/ipv4/conf/enp5s0/proxy_arp
iface enp5s0.4001 inet manual
mtu 1400
auto vmbr0
iface vmbr0 inet static
address 248.51.123.20/27
gateway 248.51.123.1
bridge-ports enp5s0
bridge-stp off
bridge-fd 0
mtu 1400
pointopoint 248.51.123.1
post-up echo 1 > /proc/sys/net/ipv4/conf/vmbr0/proxy_arp
auto vmbr1
iface vmbr1 inet static
address 10.15.200.202/24
bridge-ports enp5s0.4001
bridge-stp off
bridge-fd 0
mtu 1400
up ip route add 10.15.0.0/16 via 10.15.200.1 dev vmbr1
down ip route del 10.15.0.0/16 via 10.15.200.1 dev vmbr1
post-up echo 1 > /proc/sys/net/ipv4/conf/vmbr1/proxy_arp
post-up iptables -t nat -A POSTROUTING -s '10.15.200.0/24' -o vmbr0 -j SNAT --to-source 248.51.123.20
post-down iptables -t nat -D POSTROUTING -s '10.15.200.0/24' -o vmbr0 -j SNAT --to-source 248.51.123.20
Bash:
auto lo
iface lo inet loopback
iface enp5s0 inet manual
mtu 1400
post-up echo 1 > /proc/sys/net/ipv4/conf/enp5s0/proxy_arp
iface enp5s0.4001 inet manual
mtu 1400
auto vmbr0
iface vmbr0 inet static
address 248.51.186.174/26
gateway 248.51.186.129
bridge-ports enp5s0
bridge-stp off
bridge-fd 0
mtu 1400
pointopoint 248.51.186.129
post-up echo 1 > /proc/sys/net/ipv4/conf/vmbr0/proxy_arp
auto vmbr1
iface vmbr1 inet static
address 10.15.200.201/24
bridge-ports enp5s0.4001
bridge-stp off
bridge-fd 0
mtu 1400
up ip route add 10.15.0.0/16 via 10.15.200.1 dev vmbr1
down ip route del 10.15.0.0/16 via 10.15.200.1 dev vmbr1
post-up echo 1 > /proc/sys/net/ipv4/conf/vmbr1/proxy_arp
post-up iptables -t nat -A POSTROUTING -s '10.15.200.0/24' -o vmbr0 -j SNAT --to-source 248.51.186.174
post-down iptables -t nat -D POSTROUTING -s '10.15.200.0/24' -o vmbr0 -j SNAT --to-source 248.51.186.174
Last edited: