firewall-cmd --reload报错!

通过命令行加了几条规则

firewall-cmd --direct --permanent --add-rule ipv4 filter OUTPUT 0 \
  --out-interface enp0s8 --destination 224.0.0.18 --protocol vrrp -j ACCEPT

重启后报如下错误

Error: COMMAND_FAILED: Direct: '/usr/sbin/iptables-restore -w -n' failed: iptables-restore v1.4.21: option "--in-interface" requires an argument
Error occurred at line: 4
Try `iptables-restore -h' or 'iptables-restore --help' for more information.

能将我加的所有规则删除么?

阅读 8.5k
1 个回答

把添加命令里的 --add-rule 改成 --remove-rule ,执行下就删除了

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题