Correct network configuration so that containers can bind to ports

buhrmi

New Member
Feb 1, 2023
2
0
1
Hi all,

I've set up a fresh Proxmox 7.3 on a dedicated server. During installation I entered my public IP address (65.21.x.x/32), through which the web UI is reachable. Not sure if that was a mistake, since ifconfig and the network tab now don't show me any local IP at all.

1675264889262.png

My goal is to set up containers, allow them to access the internet, and also bind to ports.

However, I'm unsure what network configuration to use for containers. When I use the default settings (leave IP address etc. blank), the containers are unable to access the internet (ping 1.1.1.1 results in ping: connect: Network is unreachable).

Does anybody know how to correctly configure this?
 
Hey, ah cool, thanks for that.

I've checked the `/etc/network/interfaces` file in my container, and it seems as if there is not eth0 defined, even though it's configured in the UI.

Contents of `/etc/network/interfaces`
Code:
auto lo
iface lo inet loopback

Configuration in Web UI:
1675266905950.png

Am I supposed to enter an IP there? By default its empty.