edit | blame | history | raw

vilain

Mimic fail2ban with pf for OpenBSD.

Inspired from http://www.vincentdelft.be/post/post_20161106

Installation :
---------------

Download the repository, then run

make install

This will put vilain script in /usr/local/bin, vilain.py in
/usr/local/sbin and add a rc script.

Install python-3.*

pkg_add python-3.6.2

In pf.conf, add according to your configuration :

table <vilain_bruteforce> persist
block quick from <vilain_bruteforce> 

You might want to add a cron task to remove old banned IP. As example, to ban for one day max :

pfctl -t vilain_bruteforce -T expire 86400

To see banned IP :

pfctl -t vilain_bruteforce -T show

Run vilain

Run vilain manually or via rc script :

rcctl enable vilain
rcctl start vilain
edit | blame | history | raw
MIT License

Copyright (c) 2017 Thuban

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
README 793 b