After Centos was upgraded to 7, it was found that iptables could not be used to control the Linuxs Port. after google, it was found that Centos7 replaced the original iptables with firewalld. Next we will record how to use firewalld to open the Linux port: After the port firewall-cmd -- zone = public -- add-port = 80/Centos is upgraded to 7, we will find that iptables cannot be used to control the Linuxs port, google later found that Centos 7 replaced the original iptables with firewalld. The following describes how to use firewalld to open the Linux port: enable the port firewall-cmd -- zone = public -- add-port = 80/tcp -- permanent: -- zone # Scope -- add-port = 80/tcp # add a port in the format of port/communication protocol -- permanent # permanently effective, does not have this parameter reboot after failure restart firewall-cmd -- reload detailed information can refer to the following information: http://stackoverflow.com/questions/24729024/centos-7-open-firewall-port https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Using_Firewalls.html
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