Hetzner & Proxmox: Network Configuration

proxmox_logo_standard_hex_400px

As already known, I use a Proxmox setup on servers of the German host Hetzner for myself and my customers. The wiki article about the Proxmox configuration is unfortunately not really up-to-date or easy to understand…

Often my readers asked me to pour the basic network configuration into an article: said, done – here’s the article!

Preparation

In principle, you don’t have to prepare much to use a simple Proxmox setup.

Of course we need a dedicated server with installed Proxmox image and an additional IP from the Hetzner robot. We assume the following IP addresses:

  • dedicated main IP
    • IP: 138.201.203.16
    • Gateway: 138.201.203.1
  • Additional IPs (ordered via Robot – without MAC address!)
    • 138.201.203.49
    • 138.201.203.52
    • 138.201.203.56
    • 138.201.203.57

We also enable IP forwarding by executing the following command:

sysctl -w net.ipv4.ip_forward=1

We permanently enable forwarding by inserting the corresponding line in /etc/sysctl.d/99-hetzner.conf or removing the comment character.

More preparation is not necessary in this case.

Configuration Proxmox Host

On the Proxmox host, the /etc/network/interfaces file looks like this:

auto eth0
iface eth0 inet static
        address  138.201.203.16
        netmask  255.255.255.255
        gateway  138.201.203.1
	pointopoint 138.201.203.1
		
auto vmbr0
iface vmbr0 inet static
	address  138.201.203.16
	netmask  255.255.255.255
	bridge_ports none
	bridge_stp off
	bridge_fd 0
	bridge_maxwait 0
		up ip route add 138.201.203.49/32 dev vmbr0
		up ip route add 138.201.203.52/32 dev vmbr0
		up ip route add 138.201.203.56/32 dev vmbr0
		up ip route add 138.201.203.57/32 dev vmbr0

It is important here to enter the main IP (here: 138.201.203.16) for the eth0 and vmbr0 devices as a quasi „double“ entry. The gateway address must also be entered at gateway and pointopoint – Attention: pointopoint has only one t in the middle, this is not a typo!

A reboot later should display two network devices – eth0 and vmbr0.

Virtual Machine Configuration (Linux)

After the installation I change the file /etc/network/interfaces as follows:

auto eth0
iface eth0 inet static
        address 138.201.203.49
        netmask 255.255.255.255
        pointopoint 138.201.203.16
        gateway 138.201.203.16

After a restart the VM should be reachable via ping as well as via SSH.

Virtual Machine Configuration (Windows)

Sometimes you also need a Windows machine, which is why I would like to show the configuration here simply by screenshot:

he DNS servers can of course be customized, but the rest should look the same – with your own IP addresses, of course.

The option „Check settings on exit“ must not be activated, since Windows – just like Debian – checks the configuration and would report an error – despite these error messages of the The virtual machines are running completely stable.

Bottom line

The configuration is actually quite simple and very clear. By adding a single line in the network configuration, additional IP addresses can be added and superfluous ones removed. The configuration runs very stable, you don’t have to bother with DHCP servers and the performance is also satisfactory.

I hope I have been able to help some readers – and of course Google visitors – with my instructions and of course I am happy to support you in setting up your own setup – just contact me for a non-binding offer!

Questions, criticism and hints to the article I accept naturally gladly in the comments – please have however also understanding that I can offer free support only in certain framework.

1 Gedanke zu “Hetzner & Proxmox: Network Configuration”

Schreibe einen Kommentar