Hetzner additional ip not working on vm

NoahvdAa

New Member
Mar 29, 2023
2
0
1
Hey everyone,

For the past few days I've been trying to get the additional ip on my Hetzner box to work on my vm, but I haven't been very successful. The vm's internet connection just doesn't work, attempting to reach any outside ip results in the ping returning no feedback, even after ten minutes. I'm hoping some of you may know what I'm doing wrong and can help me solve this problem :)

My setup is as follows:
I have a Hetzner dedicated machine (AX41), with two additional ips attached, bringing the total to three. I want to use the 'main' ip for the machine itself and the management interface, not for any vms, which is working right now.

This is the information hetzner gives me about the ips (left out the second additional ip since I only need the first one working rn):
Main IP: <1>.135
Gateway: <1>.129
Netmask: 255.255.255.192
Broadcast: <1>.191

Additional IP: <2>.4
Gateway: <2>.1
Netmask: 255.255.255.248
Broadcast: <2>.7

My /etc/network/interfaces on the host looks like this:
Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback
iface lo inet6 loopback

iface enp41s0 inet manual

auto vmbr0
iface vmbr0 inet static
    address <1>.135/26
    gateway <1>.129
    bridge-ports enp41s0
    bridge-stp off
    bridge-fd 1
    bridge-vlan-aware yes
    bridge-vids 2-4094
    pointopoint <1>.129
    up ip route add <2>.4/26 dev vmbr0

auto vmbr5
iface vmbr5 inet static
    address 10.0.0.1/24
    bridge-ports none
    bridge-stp off
    bridge-fd 0
#private vlan

On the VM it looks like this:
Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto ens18
iface ens18 inet static
    address <2>.4
    netmask 255.255.255.248
    gateway <1>.135
    pointopoint <1>.135
    dns-nameservers 1.1.1.1 1.0.0.1 8.8.8.8

auto ens19
iface ens19 inet static
    address 10.0.0.2/24

I hope someone knows the solution to my problems :) If you need more information or have any other questions about my setup please let me know!

Thanks,
Noah
 
DId you made sure that you use the correct Mac adresses?

For Hetzner routing it is neccessary to make sure to use the correct mac adresses!
 
Thanks for the reply! I enabled the separate mac in Robot and set it for my vm in Proxmox's virtual hardware settings. I also switched to DHCP just as a test. The vm seems to get the right network configuration, and now returns Destination Host Unreachable when pinging Cloudflare, instead of just nothing. Running a traceroute to the cloudflare ip shows only the vm's ip address, <2>.4.
 
Your config it looks like good. Did You after reset ENI, you make change network in machine? Sometimes ia have bug here. Main is vmbr0 and i have to change another (for ex. vmbr5), save this, and after 5s restore to vmbr0 and it works for me. 1680473155082.png
 

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!