[SOLVED] LXC containers has no internet - Unable to make it work with NAT/nasquerade (netcup)

Skyrider

Member
May 11, 2020
51
1
13
37
So I'll try to keep it as short as possible.

Upon installation (on netcup), ens3 and vmbr0 were created by default, with ens3 bridged to vmbr0. This is a fresh / clean installation.

1653325697374.png

I then created vmbr1 as a private network with masq (tried both vmbr0 and ens3) to be used with the LXC containers. When I assigned the container's network to vmbr1 both static/dhcp I noticed the containers lack of internet access.

I then tried another approach. Removing vmbr0 and set the host info to ens3 directly. I added proxy_arp due to the mac limitations on the host.

1653325679178.png

Host is working fine. But again, I can't get the internet to work on the containers. I again tried both dhcp & setting a 10.248.110.1/24 static with gateway 10.248.110.1

The firewall is completely down for testing purposes. And I just can't figure out why it isn't working.

ip a on the host:

1653325792438.png

And its container info:

1653325825029.png

^ also tried DHCP:

1653325885837.png

And with DHCP:

1653325939375.png|

Can someone enlighten me exactly what I'm doing wrong? I can't figure it out why the container can't get a proper internet connection. Clearly dhcp shouldn't be using a local address, so that's obvious. But even with the static set, it's like it can't properly get the info needed from the vmbr0 connection.

I'd appreciate the help on the matter. Been at this for over a day trying to figure this out.
 

Attachments

  • 1653324059061.png
    1653324059061.png
    21.5 KB · Views: 39
  • 1653325325235.png
    1653325325235.png
    19.2 KB · Views: 41
  • 1653325666731.png
    1653325666731.png
    19.7 KB · Views: 30
Why did you change the netmaks form a /24 to /8 in the vmbr0 setup (second screenshot)? This might be the problem, try setting it to /24 so that everything has the same subnet.
 
Was an old screenshot, sorry about that. It's been set to /24, using the following per container network settings:

ipv4: 10.248.110.2/32
gateway: 10.248.110.1

Containers do now have access to the internet. Though for some strange reason it "randomly" fails to connect.. not sure as to why though. Is the containers network range /32 wrong? Unless I reboot the system, magicly works again.
 
Last edited:
/24 should work as well. Only the containers fail to connect or did you see something on the host as well? After a restarted of the host it doesn't work again did I understand that correctly?
 
/24 works as well nicely, thanks!

I was messing around with the networking settings and altered its range, which broke down the internet on the container. I then changed it back, and I suppose that didn't make it work until I restarted the server.
 
  • Like
Reactions: shrdlicka

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!