Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-02-2003, 04:56 AM   PM User | #1
patty
New to the CF scene

 
Join Date: Mar 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
patty is an unknown quantity at this point
Question 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
patty is offline   Reply With Quote
Old 03-02-2003, 04:20 PM   PM User | #2
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
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.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 03-02-2003, 04:27 PM   PM User | #3
patty
New to the CF scene

 
Join Date: Mar 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
patty is an unknown quantity at this point
Thanks Spookster for your response.

I am having a problem with these viewers stealing content.

Any recommendations?
patty is offline   Reply With Quote
Old 03-05-2003, 09:57 AM   PM User | #4
g00fy
New Coder

 
Join Date: Jan 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
g00fy is an unknown quantity at this point
just redirect them on login to a page that has no content




regards,


g00fy
g00fy is offline   Reply With Quote
Old 05-15-2003, 11:24 AM   PM User | #5
dragon
New Coder

 
dragon's Avatar
 
Join Date: May 2003
Location: Florida
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
dragon is an unknown quantity at this point
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.
__________________
http://www.dragonshobbies.com
dragon is offline   Reply With Quote
Old 06-10-2003, 03:25 PM   PM User | #6
Dean
Regular Coder

 
Join Date: Sep 2002
Location: Everthorpe, nr Hull, UK
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Dean is an unknown quantity at this point
banning access by ip address

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


__________________
Cheers

Dean

In the beginning god said "let there be light." and from out of the darkness a pen pusher was heard to say "not to much. that's expensive that is!"
Dean is offline   Reply With Quote
Old 06-11-2003, 07:03 PM   PM User | #7
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
Re: banning access by ip address

Quote:
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.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 06-13-2003, 04:18 PM   PM User | #8
Darknight
New Coder

 
Join Date: Nov 2002
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Darknight is an unknown quantity at this point
This might help
http://www.thesitewizard.com/archive...dththeft.shtml
Darknight is offline   Reply With Quote
Old 06-13-2003, 04:25 PM   PM User | #9
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
Quote:
Originally posted by Darknight
This might help
http://www.thesitewizard.com/archive...dththeft.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:

Quote:
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.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 06-13-2003, 04:35 PM   PM User | #10
Darknight
New Coder

 
Join Date: Nov 2002
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Darknight is an unknown quantity at this point
So what's the answer Spookster?
Sessions and logins?
Darknight is offline   Reply With Quote
Old 06-13-2003, 04:49 PM   PM User | #11
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
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.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 06-16-2003, 08:39 AM   PM User | #12
Dean
Regular Coder

 
Join Date: Sep 2002
Location: Everthorpe, nr Hull, UK
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Dean is an unknown quantity at this point
Subject: Re: Stollen Art

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

Subject: Re: Stollen Art

http://www.renderosity.com/messages....essage=1152657

It is worth reading as some interesting points have been made on the subject
__________________
Cheers

Dean

In the beginning god said "let there be light." and from out of the darkness a pen pusher was heard to say "not to much. that's expensive that is!"
Dean is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:48 PM.


Advertisement
Log in to turn off these ads.