Question relating to firewall and port opening

I just recently realized something that I can’t make sense of. I am running Nextcloud AIO 6.4.0 on a VPS, and I just noticed I have my firewall (ufw) enabled, but it is only supposed to allow traffic for SSH, and none of the ports that I should open are. However, everything is working fine.

Is there a reason that this should be the case?

Can you double check that ufw is actually active ?

sudo ufw status

Yes, it is active and shows:

Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere                  
22/tcp (v6)                ALLOW       Anywhere (v6) 

This is a known issue of UFW in conjunction with Docker. See here: GitHub - chaifeng/ufw-docker: To fix the Docker and UFW security flaw without disabling iptables

Another way to get around this would be to use the firewall of your VPS provider, if they provide one.

Thanks for the information. Marked as solution.