Skip to content

Instantly share code, notes, and snippets.

@ykrkn
Created March 18, 2013 18:47
Show Gist options
  • Save ykrkn/5189708 to your computer and use it in GitHub Desktop.
Save ykrkn/5189708 to your computer and use it in GitHub Desktop.
HOST=192.x.x.x
service denyhosts stop
mv /etc/hosts.deny /tmp
cd /var/lib/denyhosts
for i in `ls`; do mv $i $i.old; grep -v “$HOST” $i.old >> $i; done
grep -v $HOST /tmp/hosts.deny >> /etc/hosts.deny
service denyhosts start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment