Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2001
    Location
    MN, USA
    Posts
    97

    Banning IP addresses via .htacces

    I have an .htaccess file that I am using to try and ban certain IP addresses:

    <Limit GET>
    order deny,allow
    deny from 12.34.567.89 etc...
    </Limit>


    Now, two of the addresses still have access to the site according to a CGI $ENV{'REMOTE_HOST'} tag in one of my scripts.

    Have I set this up incorrectly? Is there another way to ban IP addresses? I'm confused and any help would be greatly appreciated.
    ~Gertiebeth

  2. #2
    Join Date
    Jun 2002
    Posts
    51
    Hi,

    There are few ways to solve your problem have a look at following links, Which will give tips to solve.

    What you can do is look at the Ip and you can forwarded to
    a page and say banned.

    Pretty sure there would be other way I have looked at and forget
    it. I will get back to you with that solution.


    http://webhostingtalk.com/showthread...threadid=54232

    shan

  3. #3
    Join Date
    Jun 2002
    Posts
    51

    some thought

    I think you have done is correct, but eventhough if you banned
    in {REMOTE_HOST} you will be able to see, becasue it will come to first page and then it will deny?? I guesss.


    shan

  4. #4
    Join Date
    Jan 2001
    Location
    MN, USA
    Posts
    97
    Originally posted by shann
    Hi,

    There are few ways to solve your problem have a look at following links, Which will give tips to solve.

    What you can do is look at the Ip and you can forwarded to
    a page and say banned.

    Pretty sure there would be other way I have looked at and forget
    it. I will get back to you with that solution.


    http://webhostingtalk.com/showthread...threadid=54232

    shan
    OK, went to the above link and, due to a pissing match between two posters, it was of no help ay all and didn't solve my problem.

    Any other advice?
    ~Gertiebeth

  5. #5
    Join Date
    Sep 2000
    Location
    Alberta, Canada
    Posts
    3,109
    How about doing it the tried & true way:

    <Limit GET POST>
    order allow,deny
    allow from all

    deny from x.x.x.x
    etc.
    </Limit>

    It's just a tad different then what you are using, but I have found that if not mentioned (allow or deny) and even though supposedly implied, it's always better to mention specifically.
    PotentProducts.com - for all your Hosting needs
    Helping people Host, Create and Maintain their Web Site
    ServerAdmin Services also available

  6. #6
    Join Date
    Apr 2002
    Location
    Sacramento, CA
    Posts
    220
    Originally posted by gertiebeth


    OK, went to the above link and, due to a pissing match between two posters, it was of no help ay all and didn't solve my problem.

    Any other advice?
    gertiebeth,

    I apologize for the "pissing" match between myself and another poster.

    Did Website Rob's solution work for you? Did you still have questions? If so, please explain in detail exactly what you are trying to accomplish and I may be able to assist you.

    Do you want it so a specific single IP cannot access your entire website? Or, do you want it so that it will redirect them to a page of your choice?

    What confuses me about your post is "Now, two of the addresses still have access to the site according to a CGI $ENV{'REMOTE_HOST'} tag in one of my scripts."

    If you are still needing assistance, please explain in more detail what you are trying to accomplish.
    Joel Strellner

  7. #7
    Join Date
    Jan 2001
    Location
    MN, USA
    Posts
    97

    Re: Banning IP addresses via .htacces

    Originally posted by gertiebeth
    I have an .htaccess file that I am using to try and ban certain IP addresses:

    <Limit GET>
    order deny,allow
    deny from 12.34.567.89 etc...
    </Limit>


    Now, two of the addresses still have access to the site according to a CGI $ENV{'REMOTE_HOST'} tag in one of my scripts.

    Have I set this up incorrectly? Is there another way to ban IP addresses? I'm confused and any help would be greatly appreciated.
    I figured out the solution by accident. My Ensim has a CGI bin and I needed to add a .htaccess file to the CGI bin root directory. No more spam from the offending IP address!!!
    ~Gertiebeth

Posting Permissions

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