FlushIptables.sh 427 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. #
  3. # Set the default policy
  4. #
  5. iptables -P INPUT ACCEPT
  6. iptables -P FORWARD ACCEPT
  7. iptables -P OUTPUT ACCEPT
  8. #
  9. # Set the default policy for the NAT table
  10. #
  11. iptables -t nat -P PREROUTING ACCEPT
  12. iptables -t nat -P POSTROUTING ACCEPT
  13. iptables -t nat -P OUTPUT ACCEPT
  14. #
  15. # Delete all rules
  16. #
  17. iptables -F
  18. iptables -t nat -F
  19. #
  20. # Delete all chains
  21. #
  22. iptables -X
  23. iptables -t nat -X
  24. # End message
  25. echo " [End of flush]"