1. Firewall opening, closing, and disabling commands
Recommended tutorial: centos usage tutorial
(1) Settings Enable the firewall at boot: systemctl enable firewalld.service
(2) Set the firewall to be disabled at boot: systemctl disable firewalld.service
(3) Start the firewall: systemctl start firewalld
( 4) Turn off the firewall: systemctl stop firewalld
(5) Check the firewall status: systemctl status firewalld
2. Use firewall-cmd to configure the port
(1) View firewall status: firewall-cmd --state
(2) Reload configuration: firewall-cmd --reload
(3) View open Port: firewall-cmd --list-ports
(4) Open the firewall port: firewall-cmd --zone=public --add-port=9200/tcp --permanent
related Video tutorial recommendation: linux video tutorial
The above is the detailed content of How to check whether the firewall is enabled in centos7. For more information, please follow other related articles on the PHP Chinese website!