I have now had a good look at @timf 's code and is well written and has comprehensive comments so that it is easy to understand. It shouldn’t be difficult to maintain.
I’ll pop along there shortly.
I now have this code working on my main firewall (IPFire 2.27 (x86_64) - Core Update 161) and I must say I’m quite impressed with the new features. The “IP Address Blacklist Logs” page is a very useful addition to see which blacklist is contributing to the most effective blocking and I have added an additional Local Blacklist which is generated by parsing my mail server logs for abusive ip addresses and adding the list to my web server.
I found a few problems:
There is a conflict between ipblacklist and ipfblocklist if it is installed. The ipsets generated by ipfblocklist are not removed when the addon is disabled via the WUI and therefore this addon should be uninstalled before ipblacklist is loaded
There are few missing files on Patchwork:
There is only the english lang file available.
There isn’t a init script included. I used a modified ipfblocklist one.
The logwatch file ipblacklist.conf isn’t included and needs to be written.
ipblacklists.dat needs a couple of patches:
-
remove - require “${General::swroot}/geoip-functions.pl”; - This isn’t included in core 161 and not used in this program.
-
change
&General::readhash( “/srv/web/ipfire/html/themes/”.$mainsettings{‘THEME’}.“/include/colors.txt”, %color );
to
&General::readhash( “/srv/web/ipfire/html/themes/ipfire/include/colors.txt”, %color );
Finally the maxelem value I had problems with at the start of this topic is now solved as it is set at a value to accommodate the size of each blacklist .
Rob