PrivSec-dev / privsec.dev

A practical approach to Privacy and Security
https://PrivSec.dev
Other
83 stars 25 forks source link

Add an iptable and ufw note in Docker hardening guide #273

Open thebigbone opened 3 weeks ago

thebigbone commented 3 weeks ago

There is no mention of the fact that docker adds a bunch of iptable rules which can interfere with the original firewall settings.

Additionally, if you are using ufw alone for applying firewall settings, it will definitely override all the rules that you add.

The solutions to it are either using ufw-docker project or limit the exposure of the containers to loopback addresses (127.0.0.1) instead of running it on all addresses (0.0.0.0).

TommyTran732 commented 2 weeks ago

It's weird too cuz a lot of times it overrides this for IPv4 but not IPv6