forked from bugi/iptables-by-country
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
35 lines (20 loc) · 1.06 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
This is a set of scripts you can use to block the IP addresses of specified
countries from access to specific ports. For instance, to reduce the
volume of breakin attempts, you could block anyone not in your local
country from access to your SSH port.
Warning: This should not be your only security! Also, hot coffee will
scald you if you spill it on your lap.
Warning: This set of scripts manipulates the iptables raw table. If
you're using it for anything else, be careful.
WARNING: Be nice! Please read the usage usage limits policy for the
dataset: http://www.ipdeny.com/usagelimits.php
To prepare your environment:
Install NetAddr::IP. The debian package is libnetaddr-ip-perl.
Download seed data by running ./Initialize.
Edit block-countries.conf to specify which ports and which
countries to block.
Running this will download fresh data and load it into your iptables:
./Refresh
You might even put that in crontab, but please don't run it more often
than allowed by the usage limits policy for the dataset:
http://www.ipdeny.com/usagelimits.php