I was curious, why are you doing the UFW rules if Docker is exposing the ports? Docker manipulates the iptables rules from what I understand which I think overrides UFW. Like I have UFW denying everything besides SSH and it all seems to work okay.
I haven’t been doing this very long so just wanted to make sure I wasn’t missing something.
This is correct. Docker uses its own iptable chains. They are connected to the nat table and bypass the INPUT chain. Not sure if ufw actually does something clever about it. I use raw iptables for my firewall
when UFW is enabled, it translates user-friendly UFW commands into iptables rules that are applied to the system. essentially, UFW acts as a layer on top of iptables, making firewall management easier for users.
superseding behavior:
when both UFW and iptables are active (which is not a recommended setup), UFWs rules will take precedence because UFW is managing the firewall settings that are eventually passed to iptables. Its best practice to use either UFW or iptables, not both, to avoid conflicts and confusion.
its for old traefik installation. ipWhiteList middleware in traefik was renamed to ipAllowList as part of the v2.0 release in October 2019 and now no longer works for v3 if you are using that