Forum Moderators: open

Message Too Old, No Replies

website blocker?

how to block an IP number from my website?

         

ann

5:49 am on Aug 4, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I need to know how to block an IP number from my website in order to foil some bandwidth thieves.

Anyone know? Please.

Ann

Woz

5:56 am on Aug 4, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ann,

I am not an expert and don't really have an answer for you, but but the first question people will ask is "what type of server are you on?" Techniques differ for the different servers.

Perhaps you had best post more details so our members can guide you in the right direction.

Onya
Woz

nancyb

6:04 am on Aug 4, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ann,

Use the search function for .htaccess

I just found several threads there

ann

6:31 am on Aug 4, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, and thanks for responding.

I'm sorry but I can't use htaccess.

I am on a unix server and I am thinking of calling the admin and see if he can block this particular one for me....I see no way other than the htaccess to do it myself, but I was hoping someone knew of a way to do this.

Ann

luma

7:55 am on Aug 4, 2002 (gmt 0)

10+ Year Member



Well, if you are on a Unix server, then you should be able to use .htaccess. The other possibility would be adding a rule to your firewall. If he's using images from your site, adding a copyright notice, (re)moving files, changings files might help to annoy her.

idiotgirl

10:17 am on Aug 4, 2002 (gmt 0)

10+ Year Member Top Contributors Of The Month



There are also some cgi scripts for this (preventing image theft), but you'll need access to your cgi-bin. If you cannot access your cgi-bin, can't modify your .htaccess file, and if your server admin won't help - I'd strongly consider changing hosts because it would appear your options are significantly limited to manage the problem for the long haul.

rewboss

1:18 pm on Aug 4, 2002 (gmt 0)

10+ Year Member



It is possible to use PHP to stop bandwidth hogs, but that means changing all your <img> tags.

But blocking IP addresses might not be an answer: it depends how much of a problem it is. Let's suppose I have stolen one of your images and am using it in a sig file on this bulletin board (pretend this board allows the use of images). If you think you can foil me just by blocking my IP address, think again. You will prevent me from seeing your images; but when tedster logs in, he has a completely different IP address, and he can see the image in my sig file -- and so you will have to block him, too.

In fact, you will have to block everyone who visits this board. That's a bit of a tall order, and not easy to do when there are a couple of hundred members and who knows how many lurkers, especially when a lot of them have dynamic IP addresses. Eventually, you are quite likely to end up accidentally banning people who are trying to get to your site legitimately.

You foil bandwidth thieves by checking the referring URL on any image file you serve. If the image file is being requested by an HTML document not on your server, you then block it, or serve up an alternative ("This person is stealing my bandwidth!"). This is most easily done if you have an Apache server with access to .htaccess and mod_rewrite.

ann

12:55 am on Aug 5, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, thanks for the help and pointers.

I have looked into some of the cgi solutions and I like them but can't afford the time right now that it would take to change everything around.

I have around 300 or more pages...whewww...that I upkeep myself and use images on almost, if not all, of them.

I am right now in the middle of cleaning up the site...code, externalizing .js files, a few cosmetic touchs, and validating. All that in addition to filling orders, and grabbing a sandwich once in a while...sleep???whaaas that?

I did change a few things and managed to foil them very well..:)

One of their pages sported a less than complimentary signboard on the page for a week instead of the image they were expecting...hehe!

Other pages on the site were using smaller images so the sign was a smaller version of the "message".

I think they may be getting the message. ;)

Ann