1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to block acces from any country in my site

Discussion in 'Black Hat SEO' started by Felipemd23, Aug 5, 2012.

  1. Felipemd23

    Felipemd23 BANNED BANNED

    Joined:
    Mar 21, 2012
    Messages:
    66
    Likes Received:
    11
    Hi guys, i need a tool or wordpress plugin to block acces from any country in my blog.
    Someone can help me?
    Thanks a lot
     
  2. skyuen

    skyuen Newbie

    Joined:
    Jul 12, 2012
    Messages:
    17
    Likes Received:
    2
    Home Page:
    i want to know too~
     
  3. masterjani

    masterjani Jr. VIP Jr. VIP

    Joined:
    May 10, 2011
    Messages:
    3,181
    Likes Received:
    372
    Occupation:
    seo professional
    Home Page:
  4. L3arn1ng

    L3arn1ng Newbie

    Joined:
    Jul 15, 2010
    Messages:
    23
    Likes Received:
    4
    If you have access to .htaccess or you can create one, simply follow this :

    1. To deny all requests for the restricted directory or folder, prepare a .htaccess text file in that directory and put the following directive in it:
    Code:
    deny from all
    2. ALLOW AND ENABLE ACCESS FROM CERTAIN IP
    Say you have a permanent IP and you want to administer the site via /admin and protect the directory from the rest of the world once ?n? for all, then you will want the following .htaccess directives:
    Code:
    order deny, allowdeny from all
    allow from 12.34.56.78
    
    Wherein 12.34.56.78 is your IP

    3. DISALLOW AND DENY ACCESS FROM CERTAIN IP
    yes, you get the point :
    Code:
    order allow, deny# 98.76.54.32 is a bad bot here
    deny from 98.76.54.32
    allow from all
    
    With the last code, we can possibly deny access from proxy. I am still learning how to be able to block the proxy /bot which can cause DDOS /flood using this code. blocking each and every proxy will not be ideal since you never know what IP to block. besides, we do not want to block spider bot or crawler.

    do anyone have any solution on this ?
     
  5. Kimi

    Kimi BANNED BANNED

    Joined:
    Jan 21, 2008
    Messages:
    860
    Likes Received:
    2,472
    You will need an IP recognizer.

    Kimi
     
  6. masterjani

    masterjani Jr. VIP Jr. VIP

    Joined:
    May 10, 2011
    Messages:
    3,181
    Likes Received:
    372
    Occupation:
    seo professional
    Home Page:
    By this methods you can block specific ip's only. Where as doing a complete block is quite tough to handle. For that you need to have a ddos protected hosting company or you need to have ddos protection addon.
     
  7. foxmulder

    foxmulder Newbie

    Joined:
    May 19, 2011
    Messages:
    7
    Likes Received:
    2
    It's possible with iptables rules using geoip module. But then you have to have root privileges in your server...
     
  8. dog-tag

    dog-tag Senior Member

    Joined:
    Oct 19, 2010
    Messages:
    811
    Likes Received:
    912
    Occupation:
    Full-Time Internet Marketer + Business Consultant
    Location:
    Thailand
    Go over to vbulletin.org and you will find alot of shared .htacess files

    Many forums owners want to block this also, and those guys have alot of info.
    I don't know about wordpress, but I know .htacess files work.

    You can block IP ranges pretty easy I think.