this post was submitted on 16 Feb 2024
713 points (97.6% liked)

Programmer Humor

31812 readers
534 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 6 months ago (1 children)

Ufw should work, jus ufw block/limit/allow port number

[–] [email protected] 2 points 6 months ago (1 children)

I remember trying with ufw and the docker ports were still open. Iirc I've read somewhere that docker and ufw both use the same underlying software, so ufw cannot block docker (IP tables?)

[–] [email protected] 1 points 6 months ago (1 children)

Hmm, not sure. I know with docker you can "mock" ports for the container, where the port the container sees is different than the port on the system. Maybe you can do something with that?

[–] [email protected] 1 points 6 months ago

I can configure the containers in ways that don't require ports to be published for the real network, but that's always possible. It would still be nice to have a firewall that can block even those containers that try to publish their ports to the whole (real) network.