Results 1 to 8 of 8
  1. #1

    block a state/region from accessing my website?

    Hi,

    is it possible to block a state/region from accessing my website?
    i am having issues with someone in another state from me but in my same country and i just want to block them completely.

    i have looked up the ip address in maxmind and can see the country code of AU and region code of 06
    (unfortunatley they do not have a static IP)

    is there a script or something i can put in my htaccess file or anywhere else that can block this region code?

  2. #2
    It's difficult to block a "state/region" since IP addresses don't always correspond to the state/region.

    You could try blocking by IP address in your .htaccess file:

    This blocks the single IP
    Code:
    order allow,deny 
    deny from 123.45.6.7 
    allow from all


    This next bit of code will block everything starting with 123.45.6. Note you must have that trailing "."
    Code:
    order allow,deny 
    deny from 123.45.6. 
    allow from all
    This next bit of code will block everything starting with 123.45.6. Note you must have that trailing "."

    Use at your own risk and don't blame me if you lock yourself out
    KiloServe Hosting - 48 Core Nodes and specializing in high disk I/O VPS
    www.KiloServe.com Providing Quality Hosting since 2007
    Specializing in Dedicated Servers, OpenVZ VPS, Xen VPS, and Windows VPS.

  3. #3
    Join Date
    Mar 2007
    Location
    USA
    Posts
    4,904
    What is this person doing to you that you want to block an entire state? There has to be another solution to prevent whatever he is doing.

  4. #4
    Join Date
    Apr 2011
    Location
    Philippines
    Posts
    301
    do you think you really need to do that? What about the traffic coming from that territory? Aren't you concerned of the traffic you can get from that place? We can understand you more if you tell us what's the real issue on blocking the whole state.

  5. #5
    Join Date
    Jan 2011
    Posts
    451
    Hello,

    You may want to block countries in the firewall by using Country Codes in CSF configuration. You can use the country code in the configuration variable CC_DENY of CSF. You can refer the following help link, http://www.configserver.com/cp/csfdemo/config.html.

    You can get the Country Codes from the URL, http://www.countryipblocks.net.
    " Your work is to discover your work and then with all your heart to give yourself to it. "

    That's the mark of a true professional !

  6. #6
    Join Date
    Jun 2010
    Location
    Modesto California
    Posts
    6,468
    Trying to block an entire state is probably not going to be a good idea as you will end up blocking some legitimate traffic from coming into your website. Just out of curiosity, what is this person doing that is wanting you to block them so badly?
    Need Web Hosting? Click Here to Learn Why You Should Switch To FernGullyGraphics
    FernGullyGraphics --- 426 14th St. Suite #115 --- Modesto, California --- 95354

    Need Business Cards? Click Here

  7. #7
    Join Date
    Nov 2008
    Location
    Florida, U.S
    Posts
    1,686
    Just block the IP as you go, if he changes his IP and bothers you again, block the new IP (just takes a few seconds). Trust me, they will stop trying eventually.
    HOSTLEET.COM, LLC - Elite Website Hosting Since 2008!
    Fast Reliable Affordable Secure Friendly & Courteous
    RISK-FREE Money Back Guarantee PCI-Compliant Checkout
    U.S.A Based & Operated Read Through Our Most F.A.Q's!

  8. #8
    Quote Originally Posted by Noppix View Post
    What is this person doing to you that you want to block an entire state? There has to be another solution to prevent whatever he is doing.
    I was thinking the very same thing. This guy must have been doing something really wrong for the whole state to be blocked out. I would suggest that you just block this particular IP. Take note of the IPs that access your site and block them.

Similar Threads

  1. Challenge: Block all IP addresses except one from accessing server.
    By StackHost in forum Hosting Security and Technology
    Replies: 1
    Last Post: 01-28-2007, 02:43 AM
  2. Block countries from accessing the server by APF
    By zoomx in forum Hosting Security and Technology
    Replies: 1
    Last Post: 10-06-2005, 12:41 PM
  3. How to block countries from accessing my site
    By superprogram in forum Hosting Security and Technology
    Replies: 7
    Last Post: 12-12-2004, 05:38 PM
  4. Block the whole country from accessing server
    By Shin Asuka in forum Hosting Security and Technology
    Replies: 10
    Last Post: 11-20-2004, 04:54 AM
  5. How to block an IP from accessing the server?
    By ymfm in forum Hosting Security and Technology
    Replies: 4
    Last Post: 05-11-2004, 05:58 PM

Posting Permissions

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