Hetzner network configuration

KristinnVikarJ

New Member
Apr 23, 2019
1
0
1
20
I've been trying the last 2 days to get my network configuration to work, I don't entirely understand how this networking stuff works,
my interfaces:
Code:
# network interface settings; autogenerated Please do NOT modify this
# file directly, unless you know what you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

# source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback
iface lo inet6 loopback

auto enp2s0

# route 144.xxx.xxx.64/27 via 144.xxx.xxx.65

iface enp2s0 inet manual

iface enp2s0 inet6 manual

auto vmbr0
iface vmbr0 inet static
        address  144.xxx.xxx.70
        netmask  255.255.255.255
        gateway 144.xxx.xxx.65
        pointopoint 144.xxx.xxx.65
        broadcast 144.xxx.xxx.95
        bridge-ports enp2s0
        bridge-stp off
        bridge-fd 0

iface enp2s0 inet6 static
        address 2a01:xxx:xxx:1245::2
        netmask 64
        gateway fe80::1

auto vmbr1
iface vmbr1 inet static
        address 10.10.10.1
        netmash 255.255.255.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0
This all seems to work but when I create a virtual machine that uses vmbr0 it cannot connect to the internet
 
I've been trying the last 2 days to get my network configuration to work, I don't entirely understand how this networking stuff works,
my interfaces:
Code:
# network interface settings; autogenerated Please do NOT modify this
# file directly, unless you know what you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

# source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback
iface lo inet6 loopback

auto enp2s0

# route 144.xxx.xxx.64/27 via 144.xxx.xxx.65

iface enp2s0 inet manual

iface enp2s0 inet6 manual

auto vmbr0
iface vmbr0 inet static
        address  144.xxx.xxx.70
        netmask  255.255.255.255
        gateway 144.xxx.xxx.65
        pointopoint 144.xxx.xxx.65
        broadcast 144.xxx.xxx.95
        bridge-ports enp2s0
        bridge-stp off
        bridge-fd 0

iface enp2s0 inet6 static
        address 2a01:xxx:xxx:1245::2
        netmask 64
        gateway fe80::1

auto vmbr1
iface vmbr1 inet static
        address 10.10.10.1
        netmash 255.255.255.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0
This all seems to work but when I create a virtual machine that uses vmbr0 it cannot connect to the internet


VMs using vmbr0 for internet access can only work if you have public IPs for them. And if so the corresponding MAC addresses of the virtual NICs must be known and accepted by the default router. If they are not you have to use as a workaround e.g. https://wiki.debian.org/BridgeNetworkConnectionsProxyArp

If you don't have an IP address for each VM you cannot use vmbr0, use vmbr1 instead and define NAT, e.g.

Code:
iptables -t nat -A POSTROUTING -o vmbr0 -j MASQUERADE
 

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!