0

I'm working on buidling a firewalld bash script to pre-configured some centOs7 servers and I cannot find any documentation talking about how to perform a full flush of firewall rules.

I'm looking for the equivalence in centOS6 with iptables :

flush(){
echo "Flush all chains"
iptables -F
iptables -X
}

Regarding that I'm not able to find an equivalence I'm think I may misunderstood something with firewalld..

Thanks for your feedback

Alexandre Roux
  • 470
  • 1
  • 6
  • 20
  • You don't really do that with firewalld. It manages the firewall. You need to rethink your entire approach to whatever you're doing. – Michael Hampton Dec 13 '17 at 18:01
  • your bash script should restart the service to have the new settings take effect (remember that the user executing the script should have permissions to restart the service). see http://bytefreaks.net/gnulinux/how-to-startstop-or-enabledisable-firewalld-on-centos-7 – Anson W Han Dec 14 '17 at 01:32

0 Answers0