Additional IP in lxc

RipSkils

New Member
Jun 5, 2023
7
0
1
Hello! I've been trying to add an extra ip to be used in LXC for a few days now, but I've hit a rock. The IP is added via the GUI and it can be seen in LXC using ifconfig. When I try to ping the ip it is impossible. I am attaching screenshots from the GUI and LXC.




Screenshot_489.pngscr_1.png
 
You have /32 as CIDR at eth1 - try switching it to the same CIDR as you used in eth0 (/26)
 
Those seem to be public IPs - how are you trying to check the connection? Are you pinging from the host? Or from some external device?
 
Rather than creating a second interface it might make sense to just add the second IP to the first interface from within the container:

Code:
ip addr add x.x.x.x/y dev <dev_name>
 
Is your original vmbr0 and mac address linked/set by people of Hetzner ?
You are now adding a "foreign" mac address (and ip) to the original vmbr0 config.
Maybe this is a Hetzner policy for security reasons.
Not sure, just my thoughts.