Advertisement
Johnny2

iptables-flusher.sh

Jun 18th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #!/bin/sh
  2. # sudo ./iptables-flusher.sh
  3. ##############################################################################################
  4. # iptables flusher leaving only the new linux system beginning INPUT, FORWARD, OUTPUT ACCEPT #
  5. ##############################################################################################
  6. sudo iptables -P INPUT ACCEPT
  7. sudo iptables -P FORWARD ACCEPT
  8. sudo iptables -P OUTPUT ACCEPT
  9. ################################
  10. # iptables flush #
  11. ##################
  12. sudo iptables -t nat -F
  13. sudo iptables -t mangle -F
  14. sudo iptables -F
  15. sudo iptables -X
  16. ##################
  17. sudo iptables -S
  18. echo "All added iptable rules have been flushed. Leaving only the INPUT,FORWARD and OUTPUT Accept iptable rules found on a new Linux setup at start for full connectivity."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement