README.md 793 Bytes
Newer Older
prx's avatar
prx committed
1 2 3
vilain
======

prx's avatar
prx committed
4 5 6 7
Mimic fail2ban with pf for OpenBSD.

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

prx's avatar
prx committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
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


prx's avatar
prx committed
23
In pf.conf, add according to your configuration : 
prx's avatar
prx committed
24 25 26 27 28 29 30 31 32 33 34 35

    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

prx's avatar
prx committed
36 37 38 39 40 41 42 43

Run vilain
---------------

Run vilain manually or via rc script : 

	rcctl enable vilain
	rcctl start vilain