Network configuration Proxmox on Hetzner dedicated Server

esanuvea

Member
Dec 27, 2022
9
0
6
Hello everybody.

I have a problem with the network configuration.
I have a Hetzner Server.
I installed ProxMox.
I added 2 virtual machines, one with Debian 11 on which IspManager is installed and another with Windows 11.

On the first machine with Debian 11 I chose vmbr0 and put the MAC of the additional IP AA.BB.CCC.EEE and there is no internet connection.
In the network configuration I have the following:
IPv4 Address: AA.BB.CCC.DDD # Main IP Address
MAC: additional IP data
Gateway: AA.BB.CCC.129
Netmask: 255.255.255.192
DNS: 213.133.98.98, 213.133.99.99 # of Hetzner

Configuration for this VM:
Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

On the second machine with Windows 11 I chose vmbr1 and with the following network configuration:
IP address: 10.10.10.10
Subnet mask: 255.255.255.0
Gateway: AA.BB.CCC.DDD # Main IP Address
Preferred DNS server: 8.8.8.8
On this machine everything is working fine and I have access from anywhere through the main IP.

Configuration in ProxMox:
Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

iface lo inet6 loopback

auto enp0s31f6
iface enp0s31f6 inet static
    address AA.BB.CCC.DDD/26
    netmask 255.255.255.192
    pointopoint AA.BB.CCC.129
    gateway AA.BB.CCC.129
    up route add -net AA.BB.CCC.128 netmask 255.255.255.192 gw AA.BB.CCC.129 dev enp0s31f6
  
auto vmbr0
iface vmbr0 inet static
    address AA.BB.CCC.DDD/26 # Main IP Address
    netmask 255.255.255.192
    bridge-ports none
    bridge-stp off
    bridge-fd 0
    up ip route add AA.BB.CCC.EEE/32 dev vmbr0 # AA.BB.CCC.EEE Additional IP

auto vmbr1
iface vmbr1 inet static
    address 10.10.10.1/24
    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 '10.10.10.0/24' -o enp0s31f6 -j MASQUERADE
    post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o enp0s31f6 -j MASQUERADE
    post-up   iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
    post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1

What should I do to make the first machine work? Thank you for your help.