×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Massimo Zappino
Added: Nov 28, 2015 11:05 AM
Modified: Aug 27, 2017 3:32 PM
Views: 8
chmod +x iptables_flush.sh
./iptables_flush.sh
  1. #!/bin/sh
  2. echo "Flushing iptables rules..."
  3. sleep 1
  4. iptables -F
  5. iptables -X
  6. iptables -t nat -F
  7. iptables -t nat -X
  8. iptables -t mangle -F
  9. iptables -t mangle -X
  10. iptables -P INPUT ACCEPT
  11. iptables -P FORWARD ACCEPT
  12. iptables -P OUTPUT ACCEPT