# Ban an IP



## GentsBabe (Jan 31, 2006)

Is it possible to ban an IP addy from signing guestbook in Geocities?

I've been getting dozens of porn spams in my guestbook per day for the past week  . As my site is an all ages accessible site, I'd like this stopped. I've had this site for several years now and never even got this much spam during that whole time put together as I have had lately  

I'm assuming that the offensive spammer is one and the same. How do I find out what their IP addy is and how can I block it? Would I be able to log all IP addy's as well?

I've tried to find this out surfing the net, but I'm not sure what I'm looking for, nor do I think I'd know it if I found it. I've no experience in this at all, so I guess you may have to explain it to me like I'm an idiot  

Please help


----------



## namenotfound (Apr 30, 2005)

In a .htaccess file add the following:



> order allow,deny
> deny from *ADD_THE_IP_HERE*
> allow from all


Make sure you add the IP where it's bold

You can get his IP from the raw access logs (if geocities even has those available)


----------



## cwwozniak (Nov 29, 2005)

namenotfound said:


> In a .htaccess file add the following


That may not work on Geocities ...

http://www.webmasterworld.com/forum21/7527.htm


> .htaccess doesnt work with geocities because they dont accept anyfiles starting with a "."


----------



## GentsBabe (Jan 31, 2006)

Geo doesn't have raw access logs. It says it does, but it's not available on the free or paid versions.

I've considered using a non Geo guestbook where I can log IP's, etc. I did find one that I like, but I don't know what to do with it?!?! There's no ReadMe file to explain, I don't know if it'll even work with Geo and it says it's easy to use 

It's called "Tecnixindo's Guest Book 1" and I got it from Download.com

The files are all .php, but what do I do with them, just upload the whole thing to my site? Gah, I feel dumb, I can't figure this out.

*bangs head against wall*


----------



## MMJ (Oct 15, 2006)

Glad I've never used geo cities.


----------



## namenotfound (Apr 30, 2005)

GentsBabe said:


> Geo doesn't have raw access logs. It says it does, but it's not available on the free or paid versions.
> 
> I've considered using a non Geo guestbook where I can log IP's, etc. I did find one that I like, but I don't know what to do with it?!?! There's no ReadMe file to explain, I don't know if it'll even work with Geo and it says it's easy to use
> 
> ...


Well Geocities doesn't support PHP.
So if all the files are .php then you'll have to set it up on a different site and embed it into the Geocities site with an or ( is better supported by more browsers)

Besides PHP you'll also need a MySQL database to work that guestbook.


----------



## GentsBabe (Jan 31, 2006)

Thanks for all your replies 

The only other place I have a website at is MSN and as far as I can tell, it doesn't support PHP either.

I've tries surfing around for another guestbook, but no luck. Geo either doesn't support the one's I've found, or they don't have the options for banning that I would like.

I did actually delete all links to my guestbook and I've still gotten 60+ spam  I've no idea how to embed or do iframes, so I guess I'm going to end up deleting my guestbook for a while and see what happens after a week or so. 

Thanks again everyone  :up:


----------



## namenotfound (Apr 30, 2005)

To do an iframe:

http://your-guestbook-url-here.com


----------



## sardaukar (Dec 23, 2006)

Onwe more question about IP ban.
I want to block all trafic to my site from China,Japan,Taiwan and alike (thanks to the hacker/s from these countries). In my site Cpanel, I entered the following in the "IP deny manager":
deny from 58.
deny from 59.
deny from 60.
deny from 61.

and more IPs like these.
The question is: would this work if user from 61.123.456 wants to access my site?
please don't offer to install ANY software - i want to manage all in IP deny manager.
Thanks


----------



## Squashman (Apr 4, 2003)

sardaukar said:


> Onwe more question about IP ban.
> I want to block all trafic to my site from China,Japan,Taiwan and alike (thanks to the hacker/s from these countries). In my site Cpanel, I entered the following in the "IP deny manager":
> deny from 58.
> deny from 59.
> ...


Rocket Science would probably tell me no. You would think they could also have an Allow feature for certain IP's. But like they have stated above, if your website is hosted on Apache and supports .htaccess files, you can allow and deny IP's in an .htacccess file. No software to install, just a simple file named .htaccess.


----------



## Squashman (Apr 4, 2003)

cwwozniak said:


> That may not work on Geocities ...
> 
> http://www.webmasterworld.com/forum21/7527.htm


Does Geocities support SSI. You could do it in a javascript if they do.


----------



## namenotfound (Apr 30, 2005)

Squashman said:


> Does Geocities support SSI. You could do it in a javascript if they do.


People could disable Javascript, making it useless


----------



## Squashman (Apr 4, 2003)

namenotfound said:


> People could disable Javascript, making it useless


Yeah! but some script kiddies aren't that smart. They always forget the easy stuff.


----------



## sardaukar (Dec 23, 2006)

And if I enter this "deny from 58.; deny from 59...." in my htaccess file - would user from ANY adress in this zone able to access my site?


----------



## cwwozniak (Nov 29, 2005)

sardaukar said:


> And if I enter this "deny from 58.; deny from 59...." in my htaccess file - would user from ANY adress in this zone able to access my site?


I just tested this in cPanel on our hosting service. I went into the IP Deny Manager and added *61.* as the only entry in the list. I then looked at the top level .htaccess file for the web site. It contained *deny from 61.* as an entry.

According to the cPanel documentation, this should block access from all IP addresses starting with 61.

This "APNIC resource ranges" list should let you block the entire Asia Pacific area (unless they are going through a proxy that is not in the banned range):
http://www.apnic.net/db/ranges.html#ranges


----------



## sardaukar (Dec 23, 2006)

Thank you very much for the answer )


----------

