Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New to the CF scene
    Join Date
    Mar 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    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

  • #3
    New to the CF scene
    Join Date
    Mar 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Spookster for your response.

    I am having a problem with these viewers stealing content.

    Any recommendations?

  • #4
    New Coder
    Join Date
    Jan 2003
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts
    just redirect them on login to a page that has no content




    regards,


    g00fy

  • #5
    New Coder dragon's Avatar
    Join Date
    May 2003
    Location
    Florida
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #6
    Regular Coder
    Join Date
    Sep 2002
    Location
    Everthorpe, nr Hull, UK
    Posts
    106
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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!"

  • #7
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts

    Re: banning access by ip address

    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

  • #8
    New Coder
    Join Date
    Nov 2002
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #9
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    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:

    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

  • #10
    New Coder
    Join Date
    Nov 2002
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So what's the answer Spookster?
    Sessions and logins?

  • #11
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    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

  • #12
    Regular Coder
    Join Date
    Sep 2002
    Location
    Everthorpe, nr Hull, UK
    Posts
    106
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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!"


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •