1, the basic use of Firewalld start: Systemctl start firewalld off: Systemctl stop firewalld View status: Systemctl status firewalld boot disabled: SYSTEMCT L Disable FIREWALLD Power on: Systemctl enable FIREWALLD 2.systemctl is the main tool in the CentOS7 Service Management tool, which integrates the functionality of the previous service and Chkconfig.
Start a service: Systemctl start Firewalld.service
Close a service: Systemctl stop Firewalld.service
Restart a service: Systemctl restart Firewalld.service
Displays the status of a service: Systemctl status Firewalld.service
Enable a service at boot: Systemctl enable Firewalld.service
Disable a service at boot: systemctl disable Firewalld.service
Check if the service is booting: Systemctl is-enabled firewalld.service
To view a list of services that have been started: Systemctl List-unit-files|grep enabled
To view a list of services that failed to start: Systemctl--failed
3. Configure Firewalld-cmd
View version: Firewall-cmd--version view Help: Firewall-cmd--help display Status: Firewall-cmd--state View all open ports: Firewall-cmd--zone=public-- List-ports Update firewall rules: Firewall-cmd--reload View area information: Firewall-cmd--get-active-zones View specified interface zone: Firewall-cmd-- Get-zone-of-interface=eth0 reject All packages: Firewall-cmd--panic-on de-deny status: Firewall-cmd--panic-off View reject: Firewall-cmd-- Query-panic How do I open a port? Add Firewall-cmd--zone=public --add-port=80/tcp--permanent (--permanent permanent, no failure after this parameter restart) Re-loadingFirewall-cmd--reloadViewfirewall-cmd --zone= public --query-port=80/tcp Delete Firewall-cmd--zone= public --remove-port=80/tcp--permanent
Centos7 shutting down the firewall