[Linux environment] What should I do if "FirewallD is not running" appears on centos, and how to solve it

Contents of this article

1. Tools and environment

2. The cause of the problem

Three, the solution


1. Tools and environment

Alibaba Cloud server centos 7

2. The cause of the problem

"FirewallD is not running" appears on centos, indicating that the firewall is not turned on.

Three, the solution

3.1 Execute firewall-cmd --permanent --zone=public --add-port=8080/tcp, prompt FirewallD is not running, as shown in the figure below.

3.2 Check the firewalld status through systemctl status firewalld and find that the current status is dead, that is, the firewall is not turned on.

3.3 Open the firewall through systemctl start firewalld, pay attention, it will open successfully without any prompt.

3.4 Check the firewalld status through systemctl status firewalld again, it shows that running is already turned on. As shown in FIG.

3.5 If you want to turn off the firewall settings, you may turn off the function through the command systemctl stop firewalld.

3.6 Execute firewall-cmd --permanent --zone=public --add-port=3306/tcp again, and prompt success, indicating that the setting is successful, so that you can continue the following setting.

 

 

end!

 

 

Guess you like

Origin blog.csdn.net/weixin_44299027/article/details/110730228