6. Create an logrotate for the logfile. E.g. under /etc/logrotate.d/blocklist
5. Create an logrotate for the logfile. E.g. under /etc/logrotate.d/blocklist
/var/log/blocklist
{
...
...
@@ -65,7 +57,7 @@ Also you will have to specify where your binarys are located. This settings can
compress
}
7. If you have an ip you definitly want to block just put it in blacklist.txt. If you have an IP you definitly never want to have blocked put it in whitelist.txt. This two files are just text lists seperated by new lines. So for example
6. If you have an ip you definitly want to block just put it in blacklist.txt. If you have an IP you definitly never want to have blocked put it in whitelist.txt. This two files are just text lists seperated by new lines. So for example
#blacklist.txt
2.2.2.2
...
...
@@ -76,3 +68,7 @@ Also you will have to specify where your binarys are located. This settings can
5.5.5.5
That's it. If you want to manually run the script just cd to the folder where the script is located and run ./blocklist.pl