Accéder au contenu principal

Articles

Affichage des articles du octobre, 2015

Banning IP that fails openHAB authentication

OpenHAB  is an home automation software that enables you to control your home, to get the feedback of your sensors and do various scenarios and rules. It's a very good software when you have some IT knowledge, mainly because with the rules you can develop with Domain Specific Language built on Xbase and enhance the base abilities of the software (that are already powerful with the base :-). Nervertheless I'm not here to talk about openHAB but much to say how to add jail into fail2ban configured to fit to openHAB log. Fail2ban enables to scan log files and Ban IP that fit on some rules. In our case the goal is to scan the logs of openhab to check if there is too much authentication failure and if it is the case ban the corresponding IP. Tested with: fail2ban 0.9.3 (doesn't work with 0.8.x) openhab 1.7.x, 1.8.x https Prerequisites: Enable authentication on openhab.cfg security:option=ON or security:option=EXTERNAL and set some users/pwd to users.cfg ...