Hetzner vSwitch connects two dedicated server


New Member
Sep 27, 2022
Hi everyone,
I have a dedicated server on Hetzner with only the Primary IP and inside it's running a Minecraft server. I decided to buy a second dedicated server (I haven't bought it yet) for divide the load, but I need to connect the two LXC container locally one from each other. I discovered the vSwitch and I want to know how I have to configure it on proxmox. I need to use the Primary IP for Hosts and LXC container for connect them to the internet, but I need the vSwitch for only connects the two LXC container locally, so I don't need a secondary IP only for container's internet. Right now I have the base configuration, eno1 with the public IP and vmbr0 with network.
auto lo
iface lo inet loopback

iface lo inet6 loopback

auto eno1
iface eno1 inet static
        address 176.x.yy.zzz/27
        gateway 176.y.zz.xxx
        up route add -net 176.z.xx.yyy netmask gw 176.x.zz.yyy dev eno1

iface eno1 inet6 static
        address xxx:xxx:xxx:xxxx::x/64
        gateway xxxx::x

auto eth0
iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
        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 '' -o eno1 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '' -o eno1 -j MASQUERADE
        post-up   iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
        post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1

How can I connect the two LXC container to each other?


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!