Created
January 3, 2020 06:58
-
-
Save lalinsky/22ddbe6e7445ec8dbb38ba760822c3cf to your computer and use it in GitHub Desktop.
Bulk delete UFW rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ufw status numbered | grep '# XXX' | perl -p -e 's{\[\s*(\d+)\].*}{\1}' | sort -rn | xargs -L1 ufw --force delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment