Is it possible to block nginx port?


I provide for my own a BW Server with a Apache reverse Proxy, and changed the port from Nginx to 8080, now I would know is it possible to block port 8080 from the Internet?
Actually Port 8080 is open on my Server i have already tried to block port 8080 with iptables:

sudo iptables -A INPUT -p tcp --dport 8080 -j DROP

but it changes nothing :slight_smile:.

I hope anyone can help me.

Hello @lucki1000,

Iā€™m not sure if I understand you properly. But if you have a containerized nginx proxy, iptables might not work properly as Docker itself modifies them :confused:. On a containarized nginx proxy you can just limit the port localy by mofidying the port from this:

      - 8080:8080

to this:


Hope this helps :slight_smile:

1 Like

Nice it works, Thanks. :grinning: