Proxmox LXC containers has no internet by default?

  • Greetings everyone.


    I am wanting to move over to proxmox to make my life a lot easier. While the installation went without a hitch, it's network configuration is surely a pain.


    pasted-from-clipboard.png


    Thus far I've set up the containers Network to use vmbr1 with its IP range in both DHCP & Static.. both seems to be failing. What am I doing wrong?

  • I actually wanted to edit my post showing the full configuration, but I messed up and it somewhat broke XD.


    pasted-from-clipboard.png


    vmbr0 is using the systems default IP (main host), while vmbr1 is the range I've set for the private IP range for the LXC containers.


    I'll share the rest as soon as I can once I've restored it's configurations properly.


    As for the LXC container network. I've set it to use the vmbr1 network, and set the static IP address to the same range (and tried DHCP as well). Both were not successful. This is a completely fresh installation. I've only added vmbr1 in the main network to be used for the containers.

  • Is it always the case that Proxmox puts the main LAN port in a bridge (ens3 in vmbr0)? Which ports are additionally in vmbr0? If ens3 is the only port: Why do you need this bridge?


    As far as I remember the main LAN port of the server was active as usual having the public IPs of the server. Additionally, there was one bridge (vmbr0) containing the ports of the containers having a private network for IPv4 as well as for IPv6. Finally, NAT for IPv4 and IPv6 was activated in order to bring the containers on the internet.

  • I actually have no idea why Proxmox put the main into a bridge, it was automatically picked as default upon installation. Maybe because of how netcup network is set up? My network skills are somewhat still limited when it involves configurations like this. I'll restore proxmox what it was before with a re-install so I can show its defaults.

  • Well, it should also work with two bridges, vmbr0 and vmbr1, if the vmbr0 is the external interface and vmbr1 is the internal interface.


    It is crucial to have NAT activated, otherwise the containers won't get internet access.

  • At least LXC was nice enough to do this networking nat/bridges for you, wish proxmox had these features.


    So. I reinstalled proxmox, and currently have the following:


    pasted-from-clipboard.png


    Set up the NAT to go through vmbr0, which is the host's main IP address and activated the NAT using ifup vmbr1, and restarted the network.


    Now I re-created a lxc container using the following:


    pasted-from-clipboard.png

    To use the vmbr1 bridge, and set up a static IP address which is the same as vmbr1 (also tried DHCP to grab its own address from the vmbr1 range). But even then, the internet simply won't work within the lxc container. I have no idea as to why.


    There is no firewall active on the system at this time. Disabled it for testing purposes.

  • So you have created the network configuration manually and are now trying to convince proxmox using it as foreseen? That is risky. I would do it the other way around: let proxmox create the network config and adjust it if needed.