问题原文
原帖链接 · Louise Hoffman · CC BY-SA 3.0
On CentOS 7 have I been trying out different firewalld rules and iptables commands, and now want to do it all over, but only using firewalld.
Question
How can I reset all rules to the default that CentOS 7's firewalld ships with?
社区高分解答
原帖链接 · Ahmer Mansoor · CC BY-SA 4.0
Following piece of Code may be helpful for you.
for srv in $(firewall-cmd --list-services);do firewall-cmd --remove-service=$srv; done
firewall-cmd --add-service={ssh,dhcpv6-client}
firewall-cmd --runtime-to-permanent
Regards,
Ahmer Mansoor
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
