aaronkaplan / countryblocker Goto Github PK
View Code? Open in Web Editor NEWsimple scripts which fetch CIDR blocks by country code and add them to iptables/ipset blocklists
License: GNU General Public License v3.0
simple scripts which fetch CIDR blocks by country code and add them to iptables/ipset blocklists
License: GNU General Public License v3.0
Hi,
First run
sudo ./install-rules-ipset.sh
making backup of iptables...
ipset v7.5: The set with the given name does not exist
Installing new netblock rules for country ZM.
===============================================
(IPv4)
.Done (v4)
ipset v7.5: The set with the given name does not exist
(IPv6)
.done (v6)
ipset v7.5: The set with the given name does not exist
Installing new netblock rules for country VN.
===============================================
(IPv4)
........Done (v4)
ipset v7.5: The set with the given name does not exist
(IPv6)
....done (v6)
ipset v7.5: The set with the given name does not exist
Installing new netblock rules for country RU.
===============================================
(IPv4)
.........................................................................................Done (v4)
ipset v7.5: The set with the given name does not exist
(IPv6)
..............................done (v6)
ipset v7.5: The set with the given name does not exist
Installing new netblock rules for country PK.
===============================================
(IPv4)
......Done (v4)
ipset v7.5: The set with the given name does not exist
(IPv6)
...done (v6)
ipset v7.5: The set with the given name does not exist
Installing new netblock rules for country KP.
===============================================
(IPv4)
.Done (v4)
ipset v7.5: The set with the given name does not exist
(IPv6)
done (v6)
ipset v7.5: The set with the given name does not exist
Installing new netblock rules for country IR.
===============================================
(IPv4)
...............Done (v4)
ipset v7.5: The set with the given name does not exist
(IPv6)
....done (v6)
ipset v7.5: The set with the given name does not exist
Installing new netblock rules for country ID.
===============================================
(IPv4)
.................................Done (v4)
ipset v7.5: The set with the given name does not exist
(IPv6)
..................done (v6)
ipset v7.5: The set with the given name does not exist
Installing new netblock rules for country CN.
===============================================
(IPv4)
.......................................................Done (v4)
ipset v7.5: The set with the given name does not exist
(IPv6)
....................done (v6)
ipset v7.5: The set with the given name does not exist
Installing new netblock rules for country BY.
===============================================
(IPv4)
.Done (v4)
ipset v7.5: The set with the given name does not exist
(IPv6)
.done (v6)
Then tried to remove, but it throws the following errors:
sudo ./flush-rules.sh
flushing country block list rules...
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables v1.8.4 (legacy): Couldn't load target `ZM-blocker':No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables v1.8.4 (legacy): Couldn't load target `VN-blocker':No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables v1.8.4 (legacy): Couldn't load target `RU-blocker':No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables v1.8.4 (legacy): Couldn't load target `PK-blocker':No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables v1.8.4 (legacy): Couldn't load target `KP-blocker':No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables v1.8.4 (legacy): Couldn't load target `IR-blocker':No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables v1.8.4 (legacy): Couldn't load target `ID-blocker':No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables v1.8.4 (legacy): Couldn't load target `CN-blocker':No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
iptables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
iptables v1.8.4 (legacy): Couldn't load target `BY-blocker':No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
Done.
#4 is a good first start. However, I would like to see it done in a generic way, so that:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.