How to enable port 80 in Linuxiptables firewall

Source: Internet
Author: User
When apache is installed in Linux, access IP addresses cannot be accessed! If the installation fails, the port 80 # netstat-lnt | grep80tcp00 ::80 ::: * LISTEN of the apache listener is successfully installed! Unable to use the telnetIP80 on the local machine -- but telnetIP22 is connected ~~ It may be that port 80 is not open. So Enable

When apache is installed in Linux
Access IP addresses cannot be accessed! If the installation fails, the port 80 of the apache listener is tested.
# Netstat-lnt | grep 80
Tcp 0 0: 80: * LISTEN
The installation is successful!


Think of using local telnet IP 80


--But the telnet IP Address 22 is connected ~ ~

It may be that port 80 is not open.
Therefore, port 80 is enabled.

1. enable port 80:/sbin/Iptables-I INPUT-p tcp -- dport 80-jACCEPT
2. save the configuration command:/etc/rc. d/init. d/iptables save

3. restart the service command:/etc/rc. d/init. d/iptables restart
4. check the opened Port:/etc/init. d/iptables status

Related Article

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.