Problems to open ports in IP Tables

1

Good morning I currently have an apache server running on CentOS6.9 if I disable the iptables /etc/init.d/iptables stop I can browse from a computer on the local network in apache, but if I start it even if I have enabled the ports as shown in this example, it blocks me :

sudo iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT

After opening the ports I enable the iptables keeps blocking me. So I tried to verify if the ports are enabled with the following command: nmap localhost -p 80 | grep -i tcp and I got the following result: 80/tcp open http . However:

Shows that the port is open but still does not let me access from another computer in the network. But if I turn it off: /etc/init.d/iptables stop .

What I need for iptables to allow me to receive answers from apache?

Annex result of the following command:

$ sudo cat /etc/sysconfig/iptables

    
asked by Luis Alfredo Serrano Díaz 23.07.2018 в 15:50
source

1 answer

0

I feel sorry for such a long question for such a simple mistake.

I was sending the orders by sudo and had to do it directly from the root user. I sent the orders again as root and problem solved.

I do not know whether to eliminate the question, I leave it at the discretion of the community.

Happy day.

    
answered by 23.07.2018 в 16:45