'Configure UFW for podman on port 443

I have deployed nextcloud docker image on my raspberry (ArchLinux ARM) with podman, I have opened 443/tcp port on UFW, but because of UFW nexcloud is unreachable from outside. If UFW is disabled, everything is working fine. Has anyone already configured UFW for podman on port 443 ?



Solution 1:[1]

ufw allow from [sourceIP] to any port [destinationPort]

Solution 2:[2]

Had the same issue, where the moment ufw was enabled no exposed port was reachable from the outside.

tldr; what helped me directly was addition of this rule:

iptables -I FORWARD -p tcp ! -i cni-podman0 -o cni-podman0 -j ACCEPT

however it's one of those things I'm not perfectly sure about re SecOps, so hoping there's someone who can improve on that answer.

Credits go to: https://osric.com/chris/accidental-developer/2018/12/docker-versus-podman-and-iptables/

where there's way way more description of the problem given, so give it a read too.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MrTshoot
Solution 2 Grzegorz Nowak