Skip to content

Instantly share code, notes, and snippets.

Created June 14, 2013 18:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/855b8316cf10be6526f4 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
#
# we will iterate over this directory and run every script in it
dir=`ls /etc/iptables/config-enabled/`
# but first, clear the existing iptables rules
iptables -F
iptables -X
# now iterate over each enabled config which will populate new iptables rules
for file in $dir
do
/etc/iptables/config-enabled/$file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment