Skip to content
Snippets Groups Projects
Commit 37839e81 authored by virus2500's avatar virus2500
Browse files

Path to Black and Whitelist is now set automatically

parent 681594c5
No related branches found
Tags v1.0.0
No related merge requests found
......@@ -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
......@@ -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";
......
#!/usr/bin/perl
use strict;
use warnings;
use FindBin '$Bin';
################################################################
###### Script to check Blocklist.de list. Block new IP ######
###### and unblock deleted entrys ######
......@@ -10,8 +11,8 @@ use warnings;
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";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment