Multiple LXC containers on the same IP

user_a

New Member
Dec 2, 2023
5
0
1
I have several LXC containers that have their own web interface, assigned to one IP (192.168.1.*) address. They all access the web through different ports.
But when I manually set a static IP address in the container settings, I no longer have access to any container.

Or as an option: transfer them to your own subnet (192.168.2.*) and somehow wake them up on one IP (192.168.1.*).
The second option seems more complicated...
 
Hi,
assigning the same IP address for multiple guests is asking for trouble!
If you would like to connect to the containers from outside the network, you will have to eighter setup port forwarding on the Proxmox VE host or use a VPN solution.

If you opt for exposing the service to the internet, I would recommend to use a reverse proxy such as e.g. haproxy [0] or nginx [1], and not exposing the host to the internet.
[0] https://www.haproxy.org/
[1] https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/
 
If you would like to connect to the containers from outside the network, you will have to eighter setup port forwarding on the Proxmox VE host or use a VPN solution..
Thank you. What tool can I use to set up a separate subnet inside PVE and do port forwarding? I'm new to this thread, so I'd appreciate an answer.
 
Last edited: