Block Specific country ?

Discussion in 'Site & Server Administration' started by Technomahik, Nov 18, 2011.

  1. #1
    Hello,

    I would like to know how to Block a specific country ?

    Because i m getting unusual activity on site from 1 country - and i m not getting much traffic from their (only 1)

    I have blocked his ip address but he/ she changing their ip and doing this activity.


    so let me know please
     
    Technomahik, Nov 18, 2011 IP
  2. serena85

    serena85 Peon

    Messages:
    892
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Find there IP and block it from your code.
     
    serena85, Nov 18, 2011 IP
  3. Technomahik

    Technomahik Active Member

    Messages:
    172
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    80
    #3
    I have his or her ip address but i dont know how to block it .. could you let me know please
     
    Technomahik, Nov 18, 2011 IP
  4. elicitservers

    elicitservers Peon

    Messages:
    714
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    0
    #4
    There's 2 ways really. Block a whole bunch of IP ranges in .htaccess, which can make the file large and cause issues for the web server. Or you can install a firewall (such as CSF) to block an entire country through its 2 digit ISO country code. Depends what level of access to the server you have.
     
    elicitservers, Nov 20, 2011 IP
  5. Qarizma

    Qarizma Member

    Messages:
    55
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    45
    #5
    You can block the IP range using .htaccess. Google for it.
     
    Qarizma, Nov 23, 2011 IP
  6. samazgor

    samazgor Notable Member

    Messages:
    173
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    230
    #6
    samazgor, Jun 19, 2012 IP
  7. vidbull

    vidbull Peon

    Messages:
    17
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Best and fastest way to do this is by .htaccess
    Search Google for .htaccess country blocks.
    It will give you all the IP address of countries and example how to use it in your .htaccess file in public-html folder.

    another way is to use geo ip database. there is a one popular database that will come up in google.
     
    vidbull, Jul 18, 2012 IP
  8. Hostwinds_Dan

    Hostwinds_Dan Active Member

    Messages:
    149
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #8
    The geo IP database is very helpful with this
     
    Hostwinds_Dan, Jul 18, 2012 IP
  9. cesurasean

    cesurasean Active Member

    Messages:
    269
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #9
    try using portviper....
     
    cesurasean, Aug 1, 2012 IP