Is there any way to ban people from entering my site www.purloin.net permanently? I have had problems with people messing araound..... i can only do temperarly ip ban..
Printable View
Is there any way to ban people from entering my site www.purloin.net permanently? I have had problems with people messing araound..... i can only do temperarly ip ban..
For sites using Apache, you can specify the particular IP in a .htaccess file. Don't know if that helps your situation. If you are using a commercial control panel, maybe there is a feature that assists you with that...otherwise, the server firewall may be able to block this out for you. Good luck.
I believe you can use .htaccess to do a no access from a specified IP address.
You have a problem with people messing around? Could you explain that a bit further?Quote:
Originally posted by Ingardj
Is there any way to ban people from entering my site www.purloin.net permanently? I have had problems with people messing araound..... i can only do temperarly ip ban..
In addition to banning, depending on the definition of messing around, sounds like you need to do some other security upgrades.
If they are on a dial-up or savvy enough to use proxies an IP ban is pretty much worthless. As Incognito already asked, some more information on what exactly "messing around" is might get you some more valuable responses here...
they can use proxy and enter your site again. Make friend with them. That would save you the headache.
You can use .htaccess to block a range of IPs. Put something like this inside your .htaccess file:
code:--------------------------------------------------------------------------------
<Limit GET PUT POST>
order deny,allow
deny from 127.0.0.0
deny from 192.168.0
allow from all
</Limit>
--------------------------------------------------------------------------------
and put the .htaccess file in the directory you want to block. The first deny line will block a particulary IP (127.0.0.0), the second deny line will block a range of IPs (192.168.0.0-192.168.0.255)
However, it would be harder to decide what ranges of IP a country will use. I learn that blocking 80.0.0.0/8, 81.0.0.0/8, 82.0.0.0/8 will effectively block quite a few areas/countries in Europe, Italia most likely
Use this at your own risk
I also do it with PHP script........................
block a range of IPs is not a good idea since it will block out lots of access.
"Use this at your own risk "
pico /etc/hosts.deny
add
ALL: IP
Are you root on Linux? Assuming you are, you can use:
iptables -A INPUT -s IP.ADD.RESS.HERE -j DROP
iptables is a kernel-level firewall. It will completely drop any packets server-wide coming from the IP.