netbird icon indicating copy to clipboard operation
netbird copied to clipboard

Netbird ACL doesn't work when accessing peer with Docker container

Open alexcupertme opened this issue 6 months ago • 4 comments

Describe the problem When one peer inside Netbird network tries to reach another peer's container, it fails. Destination peer has the container with published port, for example 80:8080 (external port should differ)

And in Netbird ACL i only allowed 80 and 443 ports, which should be enough

image

To Reproduce

Steps to reproduce the behavior:

  1. Connect to the netbird as user peer
  2. Connect host peer
  3. Set up docker container with external port. External port should be 80 (could be any port). Internal should be any except 80. Container should return any response locally on port 80
  4. Add single rule in the list: ALLOW TCP, All Source, All destination, ports 80, 443, bidirectional
  5. curl . Connection timed out
  6. Add second rule in ACL. ALLOW TCP, All source, All destination, port - internal port of the container
  7. curl . Getting response as expected

Expected behavior

It should be enough to add ACL rule, which allows external container port, because why i need to know all port forwardings? I dont want to specify all internal ports of all my containers, because i will expose only 80 port, not their system ports.

Are you using NetBird Cloud?

no

NetBird version

0.28.6

alexcupertme avatar Aug 04 '24 19:08 alexcupertme