Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
Path to Black and Whitelist is now set automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
virus2500 committed Apr 29, 2014
1 parent 681594c commit 37839e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
21 changes: 5 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Create an ipset based blocklist from an text file (downloaded from e.g. blocklis

Changes
--------
V1.0.4: Path to white and blacklist is now set automatically

V1.0.3: Now you can set multiple blocklist sources

V1.0.2: Added a whitelist and blacklist
Expand All @@ -15,25 +17,12 @@ V1.0.2: Added a whitelist and blacklist

You will need to install ipset!

Also you will have to specify where your binarys are located. This settings can be made in blocklist.pl .

If you want to run the script as an cronjob you will have to specify the absolute path to the whitelist.txt and blacklist.txt in blocklist.pl

my $whiteList = "whitelist.txt";

my $blackList = "blacklist.txt";

to e.g.

my $whiteList = "/scripts/blocklist/whitelist.txt";

my $blackList = "/scripts/blocklist/blacklist.txt"

where /scripts/blocklist/ is the path to the white and blacklist file!

(You can find out where your binarys are with "which" e.g. "which iptables")

While in blocklist.pl please also specify and verify where your binarys are located.

(These can be found via "which" e.g. "which iptables")
These values need to verified for your system:

my $iptables = "/sbin/iptables";

Expand Down
5 changes: 3 additions & 2 deletions blocklist.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/perl
use strict;
use warnings;
use FindBin '$Bin';
################################################################
###### Script to check Blocklist.de list. Block new IP ######
###### and unblock deleted entrys ######
Expand All @@ -10,8 +11,8 @@
my @listUrl = ("http://lists.blocklist.de/lists/all.txt", "http://www.infiltrated.net/blacklisted");
my $tmpDir = "/tmp";
my $logFile = "/var/log/blocklist";
my $whiteList = "whitelist.txt";
my $blackList = "blacklist.txt";
my $whiteList = "$Bin/whitelist.txt";
my $blackList = "$Bin/blacklist.txt";

## binarys ##
my $iptables = "/sbin/iptables";
Expand Down

0 comments on commit 37839e8

Please sign in to comment.