CentOS7 use systemctl Command to manage a single service of the system , stay CentOS7 In terms of firewalld( firewall ) Service opening , close , The same instruction is used for status queries , The operation is as follows :

Start firewall : systemctl start firewalld

View firewall status : systemctl status firewalld 

Turn off the firewall : systemctl stop firewalld

Enable firewall service at power on :systemctl enable firewalld

Disable firewall service at power on :systemctl disable firewalld

Query whether the firewall service is started :systemctl is-enabled firewalld

Query the list of started services :systemctl list-unit-files|grep enabled

Query the list of services that failed to start :systemctl –failed

When installing software or column Library , In addition to directly opening and closing the firewall , You can also open the connection directly through the port operation ; Add port :firewall-cmd –zone=public –add-port=80/tcp –permanent 

Update firewall rules :firewall-cmd –reload

View port status :firewall-cmd –zone=public –query-port=80/tcp

Remove open ports :firewall-cmd –zone=public –remove-port=80/tcp –permanent

Firewall rules are updated every time , All need to be updated :firewall-cmd –reload, Update status ;

in addition , After updating the firewall settings , You can also view all open ports :firewall-cmd –zone=public –list-ports

Technology
©2020 ioDraw All rights reserved
PHP call shell command Did you complain today ? Self made whole person computer program Comparison of data extraction tools :Kettle,Datax,Sqoop,StreamSetsKeras Output the results of each layer of the model Feature Engineering After the outbreak Which programming has a bright future Children programming children's learning route java properties Profile tool class Android Development — Display food information according to customer budget