CentOS Firewall Open 80 port

Source: Internet
Author: User

Painstakingly compiled installation finished ngnix,mysql, PHP, after the discovery can not access, later found that the firewall to the 80 port to disable. Open: (The following reference from: http://llhdf.javaeye.com/blog/526176)

 #/sbin/iptables-i input-p TCP--dport 80-j accept #/sbin/iptables-i input-p tcp--dport 22-j ACCEPT    Then Save:  #/etc/rc.d/init.d/iptables save   again to see if it already has:  [[email protected] ~]#/etc/ Init.d/iptables Status table:filter chain INPUT (Policy ACCEPT)  num  target     Prot opt s Ource               destination         1    accept     UDP  -- 0.0.0.0/0            0.0.0.0/0           UDP dpt:80 2    accept     TCP  -- 0.0.0.0/0            0.0.0.0/0           TCP dpt:80 3    rh-firewall-1-input  all  --  0.0.0.0/0            0.0.0.0/0            chain for WARD (Policy ACCEPT)  num  taRget     Prot opt source               destination       &NBSP ;  1    rh-firewall-1-input  all  -- 0.0.0.0/0            0.0 .0.0/2. Restart your computer. The  1.centos operating system firewall has already opened the 80 and 22 port  2 by default. This should also be done without restarting the computer: #/etc/init.d/iptables Restart the firewall off, shutting down its services:  3. View firewall information: #/etc/init.d/iptables status 4. Shutdown Firewall Service: #/etc/init.d/iptables stop  three. Permanently shut down the firewall   we can also permanently shut down the firewall , but I do not recommend it. Permanently shut down the firewall can do this: #chkconfig –level iptables off can also be directly modified/etc/sysconfig/iptables add a-a rh-firewall-1-input- M state--state new-m tcp-p TCP--dport 80-j ACCEPT

CentOS Firewall Open 80 port

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.