Just a simple project that generates a .htaccess file for you that denies access from certain IP Addresses that you specify to your website.
Link:
m0nsta.'s .htaccess IP Banner
Just a simple project that generates a .htaccess file for you that denies access from certain IP Addresses that you specify to your website.
Link:
m0nsta.'s .htaccess IP Banner
maybe create a simple class to ban, unban, check if the ip is banned, etc.
it's easy, just write to the file (if you can write to .htaccess files, not sure)
hmm just thought that over, i don't think that would work out so good.
Last edited by Bonitão; 26-03-11 at 06:41 PM.
All it does is generates a file for you. If you don't need a IP banning then you don't need to put it in, right?
Bad way to ban.
- Takes to long to open it.
Better to do it threw the actual website dont you think?
Ehh, This is okay.. Simple enough. Make it generate a file for it so they can just download it ;)
Most people just host their website at *some* company, so they dont have access to the physical iptables or w/e windows uses, ipsec i guess.
Yeah, yeah I understand
I've only made this to see if it would work; it may come in handy for someone one day so I put it up.
It bans each line.. You should make it check to see if each "~IP~" is a valid address.Originally Posted by http://mark-eriksson.com/php/htaccessipban/
It's dangerous to edit the .htaccess in places where the .htaccess file can disable it.
nice experiment though
It's better to do it via a database I think. And then just search if the current users IP adress is one of the banned in the db.