[root@localhost ~]# systemctl status firewalld -l
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2018-09-23 00:27:10 EDT; 2h 51min ago
Docs: man:firewalld(1)
Main PID: 8509 (firewalld)
CGroup: /system.slice/firewalld.service
└─8509 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Sep 23 00:27:09 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Sep 23 00:27:10 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Sep 23 03:01:26 localhost.localdomain firewalld[8509]: WARNING: '/usr/sbin/iptables-restore --wait=2 -n' failed: iptables-restore: line 2 failed
Sep 23 03:01:26 localhost.localdomain firewalld[8509]: ERROR: COMMAND_FAILED
Sep 23 03:01:32 localhost.localdomain firewalld[8509]: WARNING: '/usr/sbin/iptables-restore --wait=2 -n' failed: iptables-restore: line 2 failed
Sep 23 03:01:32 localhost.localdomain firewalld[8509]: ERROR: COMMAND_FAILED
我收到上述错误消息。我尝试用 Google 搜索解决方案,但找不到解决方案。知道为什么会发生这种情况吗?
答案1
我发现这个简单的技巧可以完成这项工作,尽管我仍然不知道是什么导致了这个问题。
这三行 cmd 将解决该问题:
systemctl stop firewalld
pkill -f firewalld
systemctl start firewalld