Answer the question
In order to leave comments, you need to log in
Nginx as a reverse proxy
Installed, configured - Apache now hangs on port 8080.
How to close this port so that no one has direct access to Apache?
OS - Ubuntu Server 10.04
Answer the question
In order to leave comments, you need to log in
There is no point in all these towns with iptables, it looks like if you made a window in the house, then to board it up with boards. The listen directive suggested above is the correct way.
Well, or at the level of the firewall.
iptables -t filter -A INPUT -i eth0 -p tcp --dport 8080 -j DROP
to remove the rule
iptables -t filter -D INPUT -i eth0 -p tcp --dport 8080 -j DROP
*I can't vouch for the syntax, iptables I do not use it, Google prompted these commands
Perhaps instead of eth0 you will need to specify another interface.
If on Linux it is possible in iptables By the
first rule, you allow packets coming from nginx. Yours may be 127.0.0.1 or whatever. Second you deny all other packages
iptables -A INPUT -p tcp -s [АЙПИ.НДЖИНКСА] --dport 8080 -j ACCEPT
iptables -A INPUT -p tcp --dport 8080 -j DROP
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question