centos查看防火墙状态
[root@labs ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since 一 2019-04-29 16:48:34 CST; 21h ago
Docs: man:firewalld(1)
Main PID: 769 (firewalld)
Tasks: 2
CGroup: /system.slice/firewalld.service
└─769 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
4月 29 16:48:33 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
4月 29 16:48:34 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
[root@labs ~]# systemctl stop firewalld.service
关闭防火墙:
systemctl stop firewalld.service