Bridged Containers Sharing the Same IP and Listening on Different Ports

May 18, 2019
57
1
8
Los Angeles, CA USA
Is it not possible for containers to share IPs at all? Should there be a /etc/netplan/config.yaml on Ubuntu Bionic containers?

INBOUND: If I have multiple containers sharing an IP, and these containers need to listen for incoming connections but there is no overlap in ports, how do I route these requests to the proper container? I would like to use bridging.

OUTBOUND: It seems that I can't even give multiple containers the same public IP using a bridge, the connection in the container is intermittent - even ping fails from time to time. There are no duplicate MAC addresses.

I already have security groups applied to each container with the ports they need to listen on. Outgoing policy is ACCEPT.
 

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
3,706
338
83
31
Vienna
Is it not possible for containers to share IPs at all?
in any network setup only one host can have a single ip at one time

if you need one ip for multiple endpoints, you need either a (reverse) proxy (e.g. for http/s and multiple hosts) or a firewall that translates one ip/port combo to another (e.g. for non http/s and multiple ports)
 
  • Like
Reactions: Gaia

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!