What if CentOS cannot access the Internet?

Source: Internet
Author: User

The reason is that port 80 is not enabled.

The CentOS firewall cannot be used when APACHE is installed on the CENTOS of the VM. The solution is as follows:

/Sbin/iptables-IINPUT-ptcp -- dport80-jACCEPT
/Sbin/iptables-IINPUT-ptcp -- dport22-jACCEPT

Then save:

/Etc/rc. d/init. d/iptablessave

After the computer is restarted, The CentOS firewall has opened ports 80 and 22 by default.

You may not restart the computer either here:

/Etc/init. d/iptablesrestart

Close the CentOS firewall and disable its services:

View CentOS Firewall Information:/etc/init. d/iptablesstatus

Disable CentOS Firewall Service:/etc/init. d/iptablesstop

Permanently close? I don't know how to use the permanent method:

Chkconfig-level35iptablesoff

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.