PDA

View Full Version : DirectAdmin plugin: IP Blocker


Dravu
02-21-2008, 03:27 PM
DirectAdmin doesn't come with a user-based block system. So if someone's messing with your site or doing something you don't want and you're merely a user and not an administrator, you can't just go in and add their IP to a block list and ban them from your site. The only real way I've found to be able to block based on IP without affecting the whole server is to use .htaccess files. I've spent many hours on this and did extensive testing to make sure everything works good, so it shouldn't have any problems. I tried making it so administrators could have a list of ALL the domains and apply/remove/view blocks in them, but the permissions on the home directory don't allow you to do a recursive read on all the directories inside it and DirectAdmin doesn't put a list of accounts in any environmental variables, so it's pretty much a lost cause from what I see.

http://dravu.com/directadmin/ipblocker.tar.gz

Just wondering what you guys thought of it. It's free for whatever use you want. I know there's poor people out there like me who don't like paying $30 for simple software, so I'd rather not charge. :P Whenever it's installed (use the Plugin Manager), a new link will appear in the users' main page at the bottom labelled "IP Blocker". All they have to do is click that and everything's pretty self-explanatory (except the fact that you have to click on the domain names to view the current IPs blocked. The links aren't really distinguishable from the text in the default skin)

Artyom
02-21-2008, 03:46 PM
Looks great Dravu. Thanks for this and for breathing some life into this forum. :)

You should post this on DA's forum. We'll also put it in our Downloadable Files section.

Dravu
02-21-2008, 06:41 PM
Looks great Dravu. Thanks for this and for breathing some life into this forum. :)

You should post this on DA's forum. We'll also put it in our Downloadable Files section.No problem and thanks. :)

Maybe I can think up more stuff to talk about or at least code. It'd be nice to start contributing again instead of just lurking all the time. :p

Artyom
02-21-2008, 08:29 PM
Sounds good. Start posting! :D