Page 1 of 1

Custom DIY Block list using MySQL?

Posted: 23 Dec 2014, 02:06
by drsprite
I currently run my own blocklist using fail2ban and a few parameters to catch Wordpress brute force.

fail2ban adds the entry to csf, and also populates a file that I keep as my own block list. This file is entered into csf.deny so it's reloaded upon csf restarts.

I'm looking to expand this list to mysql. Is it possible to have an ip block list using mysql?

Looking at your ip blocklist settings, if I have a small website grab the data from mysql and paste 1 IP per line, I could add myself as an http server in the IP BLOCK list portion, right?

Thoughts?
Thanks

Re: Custom DIY Block list using MySQL?

Posted: 23 Dec 2014, 03:25
by drsprite
I took the time to tinker around on this, and the answer to my question is yes.

I have my block list in MySQL. I have a PHP script that grabs all IPs and displays it on a public website. I then added this public website to the lft Blocklists section and I see my new chain in iptables.

So far so good!