Simple operation and open centos7 firewall ports

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/u013195275/article/details/102738437

1. Use the following command to view the status of the firewall, it is turned on.

Status firewalld systemctl
2, use the following command to open the firewall,
systemctl Start firewalld
3. Use the following command to set the boot from the start:

enable firewalld systemctl
4. Restart the firewall using the following command:

the restart firewalld systemctl
 5. The open ports using the following command (in this case open port 80)
to open the port command: Firewall-cmd = --zone public --add-Port = 80 / TCP --permanent

5.1 To restart the firewall is turned on

systemctl restart firewalld

Guess you like

Origin blog.csdn.net/u013195275/article/details/102738437