Helpful Information
 
 
Category: Apache configuration
htaccess and banning IP

I am unfamiliar to .htaccess and I need to ban a certain IP from viewing my web site.

I created a file and uploaded to the server. I added the following:

order allow,deny
deny from xxxxxxxx
deny from xxxxxxxx
allow from all

to my file but, the viewer is still accessing my web site. The last set of IP numbers is different each time. I am not sure where to go from here.

Any help would be greatly appreciated.

Patty

Honestly it's pointless to try and ban someone from viewing your site by banning their IP address. If they are using a dialup connection their IP address changes each time they connect and the IP address you ban will be given to someone else. Same thing goes with Cable/DSL users however their IP's don't change as often as dialup, maybe once a day or anytime they reboot their modem or machine.

Thanks Spookster for your response.

I am having a problem with these viewers stealing content.

Any recommendations?

just redirect them on login to a page that has no content :D




regards,


g00fy

I think if you leave the end of the IP address off it works like a wildcard. Someone mentioned it in another question about the same kind of thing.

hi there

there are a number of ways to do this you can add a bit of code that checks the users ip address and if it is the one you want rid of then redirect them elsewhere.

if you have a script to prevent the ip address getting in but as you saw it is on a network so the start number be 123.456.78. but the end numbers vary from .34 to .67 and so on so rather than listing every number simply put th ip address like this 123.456.78.* this way any ip address with these numbers at the strat are denined access.

it can be something as simple as this

<%
if Request.ServerVariable("REMOTE_ADDR") = "123.456.78.*" then Responce.Redirect(http://www.paintdrying.co.uk") End If %>

this bit of code will check if the person viewing the page is at an ip address if it starts with 123.456.78. then the person viewing the page will be autoredirected to www.paintdrying.com.

this can be cahnged to suit and ip range and depending how cruel you are any other website.

Hope this helps you out. if you ad this bit of code on a file and save it.

then run a bit of code like this on the very top of each of your pages in your site:

<!--#Include file="ip_redirect_script.txt"-->

it will mean that you only ever have to do it once then after that if you want to block other people accessing your site you simply change the ip_redirect_script.txt and it will automatically block access any page with the include fiel tag on the top of it.

i hope this is help fully


:thumbsup: :thumbsup: :D :thumbsup: :D

Originally posted by Dean
hi there

if you have a script to prevent the ip address getting in but as you saw it is on a network so the start number be 123.456.78. but the end numbers vary from .34 to .67 and so on so rather than listing every number simply put th ip address like this 123.456.78.* this way any ip address with these numbers at the strat are denined access.



and by doing so what if the person was using a public computer at a library or at a high school or at a university computer lab or a cyber cafe? Or you block out an entire ISP like AOL, or Roadrunner, etc. You will then block out any other legitimate users from using the site.

This might help
http://www.thesitewizard.com/archive/bandwidththeft.shtml

Originally posted by Darknight
This might help
http://www.thesitewizard.com/archive/bandwidththeft.shtml

I've mentioned this in other threads asking this but I guess I forgot to mention it here. HTTP_REFERER is also about useless as it relies on the users browser to send that. Here is a quote from that page:



Potential Problems

Like the PHP solution,
this method relies on the HTTP_REFERER variable (the variable that contains information
about the referring page) being properly sent by the visitor's browser. A number of
modern browsers as well as some of the anonymous surfing proxies and firewalls allow the user
to change this header. These browsers or proxies will thus either transmit HTTP_REFERER headers
that have some user-specified value or not bother to transmit them at all. There are
also buggy browsers around that unpredictably transmit the wrong HTTP_REFERER
header on occasion.


When this occurs your visitor will either not view the image even when he is on
your site (which means that your own page will have broken link images), or he
may be able to view your images even when it is displayed on the copyright
infringing thief's site.


Hopefully the percentage of people who encounter this is small, but you have to
be aware that these situations do occur.

So what's the answer Spookster?
Sessions and logins?

As for banning people from a site where logins are not required it is pretty much impossible unless you want to end up blocking innocent people as well.

As for protecting content that is pretty much impossible to do just by the sheer nature of how the www works. Content has to download to the users machine in order to be viewed.

The subject of stopping people stealing content has been talked about here.

Subject: Re: Stollen Art

http://www.renderosity.com/messages.ez?Form.ShowMessage=1152657

It is worth reading as some interesting points have been made on the subject:thumbsup:










privacy (GDPR)