Answer the question
In order to leave comments, you need to log in
Why is Iptables not opening port 80?
Good afternoon!
I must say right away that I am a programmer, not an admin, and I don’t have much understanding (and desire; awe; opportunity; time) of the difference between CentOS 6 and 7, so I’ll be dumb.
As I understand it, iptables was cut out in REPL 7 (through which I used to configure the firewall), I tried to return it:
systemctl stop firewalld
systemctl mask firewalld
yum install iptables-services
systemctl enable iptables
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [214:43782]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -i lo -j ACCEPT
COMMIT
systemctl restart iptables
netstat -plant # <- но там нет 80 порта
Answer the question
In order to leave comments, you need to log in
netstat -plant
here is a list of ports that are listening, but they can be buried by iptabs
iptables -L -v -n
here is a list of rules
ps aux | grep is the name of the daemon that should listen on port 80 (for example, nginx)
I think you don't have the right daemon running
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question