I currently have a server set up with NGINX Proxy Manager as a reverse proxy, together with other containers in Docker such as Portainer for apps but I am unable to access those apps on my server with a firewall (UFW) enabled.
When I enable UFW, I have to allow access to/port forward port 81 to access the admin interface of NGINX Proxy Manager, and I have allowed ports 80 and 443 as I heard those were necessary too (despite being able to access the admin interface with no issues without access to those ports allowed). However, I am unable to access any of my other apps if I don't allow access/port forward their respective ports as well on UFW (e.g. port 9000 for Portainer), despite having a reverse proxy.
On NGINX Proxy Manager, for Portainer for example, I have it set to my domain ([`portainer.mydomain.com`](https://portainer.mydomain.com)) and the forward IP to my Docker network's IP ([`172.17.0.1`](https://172.17.0.1)) together with the port Portainer is running on (`9000`). This works with no issue if I have UFW disabled but I would like to be able to use my apps with UFW enabled for security, routing everything through my reverse proxy and only allowing access to ports 80-81 and 443.
For Docker, I have it exposing my application's ports to [`0.0.0.0`](https://0.0.0.0), e.g. once again for Portainer, [`0.0.0.0:9000`](https://0.0.0.0:9000) `-> 9000`. I have tried setting it to [`127.0.0.1:9000`](https://127.0.0.1:9000) `-> 9000` instead to no avail, same goes with the forward IP for NGINX Proxy Manager.
Anyone know what's going on here?