Created
July 11, 2017 08:13
-
-
Save thepapanoob/be82b2b1d229635a8b2efc9ec8e5e339 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Add new ipset List | |
ipset -N china hash:net | |
# Get the latest Chinese Zone File | |
wget -P . http://www.ipdeny.com/ipblocks/data/countries/cn.zone | |
sudo mv cn.zone /etc/zones/cn.zone | |
# Iterate all IP's and add them to the blocklist | |
for i in $(cat /etc/cn.zone ); do ipset -A china $i; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment