CentOS 7 open firewall ports

CentOS 7 open firewall port 3306 80 etc.

     Centos 7使用firewalld代替了原来的iptables。

The method of use is as follows:

**Turn off the firewall**
systemctl stop firewalld.service #stop firewall
systemctl disable firewalld.service #Prohibit the firewall from booting and
opening the port
firewall-cmd --zone=public --add-port=80/tcp --permanent The
meaning of the command:
- zone
#Scope –add-port=80/tcp
#Add port, the format is: port/communication protocol –permanent #Permanent effect, without this parameter,
restart the firewall after invalidation
systemctl start firewalld.service #open firewall
firewall-cmd - reload

Guess you like

Origin blog.csdn.net/dandan2810/article/details/112911942