Skip to content

Instantly share code, notes, and snippets.

@kimthostrup
Last active August 14, 2018 10:50
Show Gist options
  • Save kimthostrup/a6262f92fecb381dfcff638599113634 to your computer and use it in GitHub Desktop.
Save kimthostrup/a6262f92fecb381dfcff638599113634 to your computer and use it in GitHub Desktop.
Delete all DENY rules from a UFW ruleset
sudo ufw status numbered | grep 'DENY IN' | awk -F] '{print $1}' | sed 's/\[\s*//' | tac | xargs -n 1 bash -c 'yes|sudo ufw delete $0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment