linux版本centos7, CentOS 7.0默認使用的是firewall做爲防火牆python
linux查看防火牆狀態:linux
#systemctl status firewalldcentos
[root@host-10-20-88-228 bin]# systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled) Active: active (running) since 五 2018-10-19 08:29:48 CST; 2 weeks 1 days ago Docs: man:firewalld(1) Main PID: 719 (firewalld) CGroup: /system.slice/firewalld.service └─719 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid 10月 19 08:29:48 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon... 10月 19 08:29:48 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
2.關閉防火牆dom
[root@host-10-20-88-228 bin]# systemctl stop firewalld.service [root@host-10-20-88-228 bin]# systemctl disable firewalld.service Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.