Help - Search - Members - Calendar
Full Version: Block Anonymous Access
MSFN Forums > Coding, Scripting and Servers > Web Development (HTML, Java, PHP, ASP, XML, etc.)

   
Google Internet Forums Unattended CD/DVD Guide
Orsi
Hey there,
there's some stupid guy (or girl) accessing my site (my blog actually) and posting highly offensive comments. He's doing this for more than a year. I know he's only access my site through www.anonymouse.org, so how can I block his access?
Since my site is hosted in a third part server, I can't do anything directly in it, except if I use some javascript code or something.

Anybody can help with this code? (This means, tell me exactly how the code must be to work)


thanks :-)
ripken204
well either you can manually type in the allowed ip addresses or you can have some sort of a login system.

you can check this out too.
http://labs.involutive.com/2007/06/03/php-...g-curl-library/
Idontwantspam
I don't know about www.anonymouse.org, but I'll assume it hides their IP address. Couldn't you block www.anonymouse.org's IP address? Or his, if possible?
Orsi
Anonymouse IP always start with 85.195. , so I need some script allowing me to block some IP range.

A login system wouldn´t be usefull, since most people don't use them real name on internet forms, except for shopping
Idontwantspam
It would not be very feasible to do that with javascript, and they could disable it anyway. You need to see if there is any way in your web hosting control panel to block IP addresses.
electroglyph
put this in your .htaccess

CODE
order deny,allow
deny from anonymouse.org 85.195.
allow from all
Orsi
electroglyph > where I find this file in my web server? smile.gif
electroglyph
http://www.javascriptkit.com/howto/htaccess.shtml

create it and place in the root folder of your site(htaccess affects current folder and all subfolders). htaccess is an apache thing, won't work if your site runs on a different webserver. also, your host may not allow you to use .htaccess because it can slow down the server.

so you'll want to test whether or not your .htaccess does anything once you upload it. an easy test would be to first try out an ErrorDocument directive.
Orsi
tks...
the weird thing is that the password protection worked but IP blocking didn't...

I just sent an email to my web provider to check if it uses apache or something else

thank you smile.gif
Idontwantspam
Well, it's got to be an Apache server, and they have to let you. Some hosting providers don't.
Orsi
yeah... I sent them an email asking what to do and they said I isn't possible cos' it would block the access to the whole server, not ownly my account

well, thank you all for the help
Idontwantspam
QUOTE (Orsi @ Jul 19 2007, 07:18 PM) *
yeah... I sent them an email asking what to do and they said I isn't possible cos' it would block the access to the whole server, not ownly my account

well, thank you all for the help

BULL! realmad.gif
Not what you said blushing.gif , what they said.

.htaccess files can be placed in any subdirectory and have effect on only that directory. They're either trying to get you to go away, or else thet're not as smart as they think. Even if it's hosted on IIS, it should be possible for them to block a certain IP range for just one directory.

EDIT:
And besides, why should they care if you block anonymous vandals? Though my above statement could be false if your stuff is in the root directory of the server, but I don't think it would be. Can you tell us what your domain name is and who hosts your blog?
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.