Created
January 26, 2020 09:58
-
-
Save pengelana/7337bef687f5c636231032082b6e2043 to your computer and use it in GitHub Desktop.
block_amazon
This file contains 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
curl -si 'https://ip-ranges.amazonaws.com/ip-ranges.json' | grep 'ip_prefix' | awk '{print $NF}' | sed 's/[",]//g' | xargs -n1 /sbin/ipset add blacklist | |
curl -si 'https://ip-ranges.amazonaws.com/ip-ranges.json' | grep 'ipv6_prefix' | awk '{print $NF}' | sed 's/[",]//g' | xargs -n1 /sbin/ipset add blacklist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment