Custom DIY Block list using MySQL?

Post Reply
drsprite
Junior Member
Posts: 28
Joined: 21 Jun 2008, 18:39

Custom DIY Block list using MySQL?

Post 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
drsprite
Junior Member
Posts: 28
Joined: 21 Jun 2008, 18:39

Re: Custom DIY Block list using MySQL?

Post 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!
Post Reply