Hetzner Proxmox Network Setup

Setting up Proxmox can be somewhat difficult on a Hetzner dedicated server. Once the initial install is completed it gives one the false sense of hope that they are done with the install and ready to use it. In reality, setting up the network interfaces can be a time-consuming and quite annoying process. To alleviate the frustration from this, I have created a python script that is embedded below that will generate the file for /etc/network/interfaces. I recommend testing it while you still have KVM access to the server but that is not required and all “should” work fine. If you have any questions please email me at [email protected] or use the contact form on this site. 

The Host’s IP, Host’s Gateway IP, and Hosts’s Netmask can be found in the Robot Console

https://robot.your-server.de/server

The Additional IP Information can be found in the Subnets section on the Robot page:

Clicking the second subnet so the checkmark appears and then clicking the plus will show all IP addresses:

You also need to turn on IP forwarding, run the command below to turn it on:

sysctl -w net.ipv4.ip_forward=1

If you would like an internal network between the VMs/Containers then copy and paste the below code to your /etc/network/interfaces file:

auto vmbr1
iface vmbr1 inet static
    address 10.20.30.1
    netmask 255.255.255.0
    bridge_ports none
    bridge_stp off
    bridge_fd 0
    post-up iptables -t nat -A POSTROUTING -s '10.20.30.0/24' -o eth0 -j MASQUERADE
    post-down iptables -t nat -D POSTROUTING -s '10.20.30.0/24' -o eth0 -j MASQUERADE