I have a Hetzner dedicated server with single network card and two public IP addresses (both IPs have its own gateway). Right know it has only one address configured with neplan. Below is my config
network:
version: 2
renderer: networkd
ethernets:
enp195s0:
addresses:
- x.x.x.x/32 #Main IPv4 address
- xx.xx.xx.xx::2/64 #IPv6
routes:
- on-link: true
to: 0.0.0.0/0
via: gx.gx.gx.gx #Main IPv4 address Gateway IP
nameservers:
addresses:
- 185.12.64.2
- 185.12.64.1
- 2a01:4ff:ff00::add:1
- 2a01:4ff:ff00::add:2
And now I want to configure network to have two public IPs as a bridge because I want to share it with kvm guest machines. Here is one of my tries:
network:
version: 2
renderer: networkd
ethernets:
enp195s0:
dhcp4: false
dhcp6: false
bridges:
kvmbr0:
interfaces:
- enp195s0
addresses:
- x.x.x.x/32 #Main IPv4 address
- y.y.y.y/32 #Additional IPv4 address
routes:
- to: 0.0.0.0/0
via: gx.gx.gx.gx #Main IPv4 address Gateway IP
table: 1
metric: 100
- to: 0.0.0.0/0
via: gy.gy.gy.gy #Additional IPv4 address Gateway IP
table: 2
metric: 200
mtu: 1500
dhcp4: no
dhcp6: no
nameservers:
addresses:
- 185.12.64.2
- 185.12.64.1
- 2a01:4ff:ff00::add:1
- 2a01:4ff:ff00::add:2
parameters:
stp: false
forward-delay: 4
The problem is that after netplan apply I always loose the internet connection :/ I have a script which recovers default netplan config after a few minutes if I don't stop it, so it's hard form me to check what happens on server but I suppose that it is something with
routing.
I'm new in netplan configs, could you please help me to find proper solution?