Skip to content

Instantly share code, notes, and snippets.

@stefanocudini
Created April 3, 2012 19:30
Show Gist options
  • Select an option

  • Save stefanocudini/2294949 to your computer and use it in GitHub Desktop.

Select an option

Save stefanocudini/2294949 to your computer and use it in GitHub Desktop.
unban ip from all chains in iptables
#!/bin/bash
chains=$(iptables -L | grep "Chain fail2ban" | cut -d' ' -f2)
for chain in $chains
do
iptables -D $chain -s $1 -j DROP
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment