Proxmox Routed Networking
When using Proxmox on the F2H network there are some special networking requirements that need to be configured inside your server. Without this special configuration, Proxmox guests will not be able to communicate with the outside world. This guide details a Proxmox routed networking configuration. This means you cannot use single IPs (/32 subnets) but you can use other subnet types.
Allow IP Forwarding
In all of our OS distributions, we disable IP forwarding as standard. Because our bridge will not be connected physically to the ethernet adapter we need to enable forwarding for IPv4 and IPv6. This is done in the /etc/sysctl.conf file or by issuing the following commands.
sysctl -w net.ipv4.ip_forward=1
sysctl -w net.ipv6.conf.all.forwarding=1
You may need to remove the comment (#) from the lines in the /etc/sysctl.conf file. In some distributions, there are no comments. Ensure the file looks like the image below. Reboot the host after making these changes.
Proxmox Interfaces Configuration
The interfaces file contains all of the required networking settings. Here we create a bridge and add any additional IPs. Do not create the bridge in the Proxmox GUI. When we make the changes in the interfaces file, these will be replicated to the GUI. We have also provided a copy of this file located here with comments and further information.
auto lo iface lo inet loopback iface lo inet6 loopback auto enp5s0 iface enp5s0 inet static address 176.xx.xx.36/27 gateway 176.xx.xx.33 # pointopoint GATEWAY-IP broadcast 184.108.40.206 up route add -net 176.x.xx.32 netmask 255.255.255.224 gw 176.x.xx.33 dev enp5s0 iface enp5s0 inet6 static address 2a01:4f8:150:2218::2/64 gateway fe80::1 auto vmbr0 iface vmbr0 inet static address 176.x.xx.36/27
broadcast 176.x.xx.63bridge-ports none
bridge-stp offbridge-fd 0
up route add -host 178.63.xxx.225 dev vmbr0 up route add -host 178.63.xxx.224 dev vmbr0 up route add -host 178.63.xx.226 dev vmbr0 up route add -host 178.63.xxx.227 dev vmbr0 up route add -host 178.63.xxx.228 dev vmbr0 up route add -host 178.63.xxx.229 dev vmbr0 up route add -host 178.63.xx.230 dev vmbr0 up route add -host 178.63.xxx.231 dev vmbr0auto vmbr1 iface vmbr1 inet static address 10.10.10.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 iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o vmbr0 -j MASQUERADE post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o vmbr0 -j MASQUERADE
After making the required changes reboot the host. So, in the Proxmox GUI, you should now see your adapter and bridge. Check the network page. If you see the new adapter and bridge you can now continue to create a guest VM or container.
How was this article?
You might also like
More from Proxmox
How to create a ZFS Swap Partition
Swap on Linux will assist if your environment is running short on memory. Usually, during setup, most distributions configure a …
How To Configure Bridged Proxmox Networking
How To Configure Bridged Proxmox Networking In a Routed Proxmox setup, you add your IP addresses to your interface then forward …
How To Configure Proxmox Bridged Networking
How To Configure Proxmox Bridged Networking Unlike a Promox Routed Networking setup, Bridged networking requires that MAC addresses are assigned to …