Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Chef55

macrumors member
Original poster
Sep 10, 2008
64
0
U.K.
Am having trouble with someone leaving messages on my guestbook so want to ban their ip address so they can't access my site. I don't use an imac account. Help please anyone?
 
Can you explain your config some more? Is this an app hosted on your system at home? Do you have a firewall?

That said, if this person has a dynamic IP, this will likely only deter them for a period of time.
 
If you're using an Apache web server, add this to a .htaccess file:
Code:
<Limit GET POST>
   order allow,deny
   allow from all
   deny from 100.100.100.100
</Limit>
That .htaccess file should be saved to your htdocs (or equivalent folder i.e. htmlpublic) folder.

Like belvdr mentioned though, people generally have a dynamic IP so it's not a full-proof solution. You can also use PHP/MySQL to keep a list of IP to block. There should be scripts out there for setting this up. You might be able to set other solutions up too depending how consistent this user is.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.