How to get firewall working with NGINX Proxy Manager?

Hello everyone,

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 ([``]( and the forward IP to my Docker network's IP ([``]( 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 [``](, e.g. once again for Portainer, [``]( `-> 9000`. I have tried setting it to [``]( `-> 9000` instead to no avail, same goes with the forward IP for NGINX Proxy Manager.

Anyone know what's going on here?

Leave a Comment