Linux firewall configuration is also in effect if you want to reboot

Source: Internet
Author: User

A newly configured server, installed CentOS6.3 system, after the installation of LNMP, the discovery Nginx process exists, and PHP parsing is normal, but with the allocation of independent IP to access the time found to be inaccessible.

Check the information on the Internet, it is possible that the Linux firewall iptables caused nginx can not access. We visit a Web site, typically with 80 ports, then the problem may be that the 80-port access is intercepted. View the/etc/sysconfig/iptables file, found that there is no 80 port configuration rules, need to modify the next iptables.

Execute under Root:

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

Then execute (immediate effect, restart invalidation):

service iptables stop
service iptables start

To take effect after reboot, execute:

chkconfig iptabels on
chkconfig iptabels off

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.