Bridged IPv4 with Routed IPv6 on hetzner DS?

Undergrid

Well-Known Member
Jul 15, 2018
31
3
48
49
For a while now I've been using Proxmox VE 5.2 with bridged IPv4 addresses to (amongst other things) host some websites for friends and family. I've been asked if I can get IPv6 working but this has turned out to be problematic because my dedicated server supplier, Hetzner, does not support bridging with IPv6.

Is it possible to run bridged IPv4 and routed IPv6 addresses on the same machine? If so, how do I go about it?

I've included my current host and one vm network configuration as it stands (IP addresses modified) and any help you can offer would be appreciated.

Thanks.

Host Config:

Code:
auto lo
iface lo inet loopback

iface lo inet6 loopback

auto enp2s0
iface enp2s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address  192.168.1.2
        netmask  255.255.255.192
        gateway  192.168.1.1
        bridge_ports enp2s0
        bridge_stp off
        bridge_fd 0

iface vmbr0 inet6 static
        address  100::2
        netmask  64
        gateway  fe80::1

VM Config:

Code:
auto lo
iface lo inet loopback

# The primary network interface
auto ens18
iface ens18 inet static
        address 192.168.2.2
        netmask 255.255.255.192
        gateway 192.168.2.1
 
You can use the new VSwitch Feature for this. You can add an ipv6 network to a own vlan

Thanks for the advice but I am probably going to need a little more help than that. I didn't even know that vswitch existed and I've no idea how to set it up as you suggest...
 
This works for me in a hetzner setup:

Code:
iface eth0 inet6 static
        address 2a01:4f8:1:2::2
        netmask 128
        gateway fe80::1

auto vmbr0
iface vmbr0 inet static
        address  192.168.254.1
        netmask  255.255.255.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0

iface vmbr0 inet6 static
        address 2a01:4f8:1:2::2
        netmask 64
 
This works for me in a hetzner setup:

The problem there is that you aren't bridging IPv4 traffic ("bridge_ports none"), and I don't think I can assign an IPv6 address to a port that's bridged as in my case ("bridge_ports enp2s0")
 
  • Like
Reactions: batista10
Yeah, you're right, my fault. I just checked another server of mine and why don't you use a routed configuration for IPv4 and IPv6?
 
Yeah, you're right, my fault. I just checked another server of mine and why don't you use a routed configuration for IPv4 and IPv6?

Mainly because IPv4 is working and I was hoping just to be able to quickly add IPv6.

Also, I've seen loads of different proxmox configurations for Hetzner (some with loads of additional routes, some with weird configs on the VM's) and I don't really have the server downtime to fiddle around and figure out which ones are right for me.

Plus my IPv4 addresses are seperate single IP addresses, not a subnet, and I'm guessing most people use routing wit a subnet.
 
I am in the same situation on my server at Hetzner.

I have several IPv4 assigned to VM's in bridge mode.

Now looking for a way to use IPv6 in routed mode for additioal VM's,

Did you ever find a solution to this? Please update.

Thank you.
 
I am in the same situation on my server at Hetzner.

I have several IPv4 assigned to VM's in bridge mode.

Now looking for a way to use IPv6 in routed mode for additioal VM's,

Did you ever find a solution to this? Please update.

Thank you.

So my current config on the host looks like this:

Code:
auto lo
iface lo inet loopback
iface enp0s31f6 inet manual

auto vmbr0
iface vmbr0 inet static
        address  95.216.XXX.YYY
        netmask  255.255.255.192
        gateway  95.216.XXX.YYY
        bridge-ports enp0s31f6
        bridge-stp off
        bridge-fd 0

iface vmbr0 inet6 static
        address  2a01:4f9:2a:ZZZ::2
        netmask  64
        gateway  fe80::1

In /etc/sysctl.d/ipv6.conf I have

Code:
net.ipv6.conf.all.forwarding=1

And individual nodes have configs like

Code:
auto lo

auto ens18
iface ens18 inet static
        address 95.216.XXX.AAA
        netmask 255.255.255.192
        gateway 95.216.XXX.BBB

iface ens18 inet6 static
        address 2a01:4f9:2a:ZZZ::XXX:YYY
        netmask 64
        gateway fe80::1

Note the IPV6 address on the nodes has to be one from the /64 Hetzner assigned you and NOT a private address.

And that works for me...
 
I am not sure this is directly transferable to my setup.

Are you using Open vSwitch? I do. I think this was recommended by the configuration guide I read while setting up my server.

I have not tinkered with the configuration files manually, I've done everything in the webinterface.

My /etc/network/interfaces

Code:
auto lo
iface lo inet loopback

allow-vmbr0 enp0s31f6
iface enp0s31f6 inet manual
        ovs_type OVSPort
        ovs_bridge vmbr0

allow-ovs vmbr0
iface vmbr0 inet static
        address  95.216.XX.XXX
        netmask  32
        gateway  95.216.XX.XXX
        ovs_type OVSBridge
        ovs_ports enp0s31f6

iface vmbr0 inet6 static
        address  2a01:4f9:XXXX::
        netmask  64
        gateway  XXXX::1

allow-ovs vmbr1
iface vmbr1 inet static
        address  192.168.1.10
        netmask  24
        ovs_type OVSBridge
 

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!