H
H
HoHsi2016-01-31 14:23:55
iptables
HoHsi, 2016-01-31 14:23:55

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

/etc/sysconfig/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 порта

After the reboot, port 80 also did not open. What is the problem, and what other nuances are there when moving from 6 to 7?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Muidinov, 2016-01-31
@HoHsi

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 question

Ask a Question

731 491 924 answers to any question