[SOLVED] Please help me configure Hetzner's vSwitch with Public IP

Razva

Renowned Member
Dec 3, 2013
252
10
83
Romania
cncted.com
Hey,

Hetzner's network configuration is ... weird.

I would really apreciate if you could copy/paste your (functional) network configuration for:
- Proxmox NODE network configuration for a vSwitch + public IP class
- Proxmox VM network configuration that uses an IP for the previously created ^^^ IP class

Thanks for your help/time!

Later edit: I've created a tutorial about solving this.
 
Last edited:
Hey guys, not sure if that tutorial is still up to date but I found out that following just that setup only works for single host, when doing a cluster I had to tell the vmbr to be vlan aware I'm the public ips.
Now I did not manage to get this to work for private ips, did u guys?
I mean for private ips this worked only within the host, when I try to reach VMs on other hosts of the cluster it fails :/
Do the vSwitchs on hetzner have a gateway or something for this? :/

Anyone had any luck doing this?


Thanks
 
Hi

first of all thank you @Razva + @DerDanilo for sharing your insight and the tutorial with us.
I was able to use the tutorial to setup my server (it is just a single one atm) and VMs are reachable via their public IP or the assigned internal one.
Although the VMs can reach each other with their private network IP, I'm not able to reach the VMs (with internal IPs only) from the host itself.
My setup follows the instructions from the shared tutorial: Razvas Tutorial

Any ideas? Do I need to set an additional route or tweak the instructions from the tutorial?
 
Hi

first of all thank you @Razva + @DerDanilo for sharing your insight and the tutorial with us.
I was able to use the tutorial to setup my server (it is just a single one atm) and VMs are reachable via their public IP or the assigned internal one.
Although the VMs can reach each other with their private network IP, I'm not able to reach the VMs (with internal IPs only) from the host itself.
My setup follows the instructions from the shared tutorial: Razvas Tutorial

Any ideas? Do I need to set an additional route or tweak the instructions from the tutorial?

Hey,

Glad that you found my tutorial useful. :cool:

1. Did you installed Proxmox from their original ISO or did you installed Debian and then "converted" it to Proxmox?
2. Are you sure that you've assigned floating IPs to the vSwitch, and not some static IPs?
 
Hi Razva,

reg. 1: I installed proxmox (v8.0.4) on a Debian Bookworm setup.
reg. 2: I created two vSwitches. One public and one private. For the public one I've ordered a /29 IP range and have added the server to both vSwitches. Did I miss something in your tutorial? I didn't add any IP directly to the private vSwitch, but used the IP settings as described in your tutorial. Do I need to do another steps?

Update:
The server currently has only the IP configured which it got at the beginning. It is also reachable by one of the newly purchased IPs.
So in short, the server can now be reach via its initial IP and the one from vSwitch.

I assume I need to add a floating IP by this kind of setting in /etc/network/interface:

auto eth0:1 iface eth0:1 inet static address your.Float.ing.IP netmask 32 # source: https://docs.hetzner.com/de/cloud/floating-ips/persistent-configuration
If I understand correctly, then this setting is for the public Ips only or can I add this setting also for the private vSwitch ?
 
Last edited:
Me again. Maybe I solved it by my own. Let me share it here (so that you can shout if it is totally wrong), and if not other find it maybe useful.
Maybe even worth for the tutorial...

The only adjustment necessary was adding an IP address from the private network range to the private IP interface:
Code:
auto vmbr4001
iface vmbr4001 inet static
    address 10.1.1.5/24
    bridge-ports eno2.4001
    bridge-stp off
    bridge-fd 0
    mtu 1400
#Private vSwitch

Now all VMs and also the host can reach each other by their private IP addresses.
 
Me again. Maybe I solved it by my own. Let me share it here (so that you can shout if it is totally wrong), and if not other find it maybe useful.
Maybe even worth for the tutorial...

The only adjustment necessary was adding an IP address from the private network range to the private IP interface:
Code:
auto vmbr4001
iface vmbr4001 inet static
    address 10.1.1.5/24
    bridge-ports eno2.4001
    bridge-stp off
    bridge-fd 0
    mtu 1400
#Private vSwitch

Now all VMs and also the host can reach each other by their private IP addresses.
@Kaan Karaca thank you for this. It saved me time from trouble shooting connectivity.
@Razva Great tutorial, thanks. Perhaps you can add this info to make sure the host has a private IP assigned to it.
 
Unfortunately, I was only able to get the private IPs working. I'm struggling with the Public IP. Hetzner's vswitch setup is so overly complicated and they provide ZERO support for it. This is my host config.

Bash:
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
        address x.x.x.x/26
        gateway x.x.x.1
        bridge_ports eno1
        bridge_stp off
        bridge_fd 0

iface eno1 inet6 static
        address 2a01:4f9:4b:3c10::2/64
        gateway fe80::1

iface eno1.4040 inet manual
auto vmbr4040
iface vmbr4040 inet manual
        bridge_ports eno1.4040
        bridge_stp off
        bridge_fd 0
        mtu 1400
#Public vSwitch

iface eno1.4041 inet manual
auto vmbr4041
iface vmbr4041 inet manual
        address 10.0.1.2/16
        bridge_ports eno1.4041
        bridge_stp off
        bridge_fd 0
        mtu 1400

I'm using almalinux 9. I have my IP, mask and gateway assigned from my separate /27 block which is on my vSwitch id 4040. I can't reach out to internet from my VM's. Any help would be helpful.
 
Unfortunately, I was only able to get the private IPs working. I'm struggling with the Public IP. Hetzner's vswitch setup is so overly complicated and they provide ZERO support for it. This is my host config.

Bash:
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
        address x.x.x.x/26
        gateway x.x.x.1
        bridge_ports eno1
        bridge_stp off
        bridge_fd 0

iface eno1 inet6 static
        address 2a01:4f9:4b:3c10::2/64
        gateway fe80::1

iface eno1.4040 inet manual
auto vmbr4040
iface vmbr4040 inet manual
        bridge_ports eno1.4040
        bridge_stp off
        bridge_fd 0
        mtu 1400
#Public vSwitch

iface eno1.4041 inet manual
auto vmbr4041
iface vmbr4041 inet manual
        address 10.0.1.2/16
        bridge_ports eno1.4041
        bridge_stp off
        bridge_fd 0
        mtu 1400

I'm using almalinux 9. I have my IP, mask and gateway assigned from my separate /27 block which is on my vSwitch id 4040. I can't reach out to internet from my VM's. Any help would be helpful.
Turns out it was the vSwitch. Hetzner had an outage a few days ago. Once I removed and readded my servers to the vSwtich it started working. Just fyi if anyone else is having issues.
 

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!