Docker docs:
Docker routes container traffic in the nat table, which means that packets are diverted before it reaches the INPUT and OUTPUT chains that ufw uses. Packets are routed before the firewall rules can be applied, effectively ignoring your firewall configuration.
Also when using a rootfull Podman socket?
I haven’t tried rootful since I haven’t had issues with rootless. I’ll have to check on that and get back to you.