打开firewalld
[root@hf-01 ~]# systemctl disable iptables
[root@hf-01 ~]# systemctl stop iptables
[root@hf-01 ~]# systemctl enable firewalld
Created symlink from /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service to /usr/lib/systemd/system/firewalld.service.
Created symlink from /etc/systemd/system/basic.target.wants/firewalld.service to /usr/lib/systemd/system/firewalld.service.
[root@hf-01 ~]# systemctl start firewalld
[root@hf-01 ~]#
这时用iptables -nvL和iptables -t nat -nvL查看规则,会看到增加了很多的链
[root@hf-01 ~]# firewall-cmd --get-zones //查看所有zone
block dmz drop external home internal public trusted work
[root@hf-01 ~]#
[root@hf-01 ~]# firewall-cmd --get-default-zone //查看默认zone
public
[root@hf-01 ~]#