Results 1 to 6 of 6
  1. #1

    How To Block A Specific Country From Visiting Your Website?

    Hi,

    I don't want those from Nigeria and a few other countries to visit my websites as most of the visitors were scammers. Where can I find IP range for all the countries in this world so that I can block specific countries from accessing my websites?

    Thanks for your help.

  2. #2
    Join Date
    Feb 2007
    Location
    Florida
    Posts
    1,932
    mod_geoip + .htaccess
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  3. #3
    Currently I am manually blocking individual IP address through .htaccess.

    mod_geoip is something new to me. Not sure how to do it or what it is.

  4. #4
    Join Date
    Feb 2007
    Location
    Florida
    Posts
    1,932
    It's a free modules for Apache from MaxMind. You can install it with EasyApache.

    EasyApache Module: http://www.cpanel.net/apps/easyapache/custom.html
    How to use it with .htaccess: http://www.maxmind.com/app/mod_geoip

    And don't forget to setup a cron to automatically download the new .dat file each month!
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  5. #5
    If you are using CSF firewall then it has whole country block features. Also you can visit: http://www.ipdeny.com/ipblocks/ for Country Codes to use in CSF configuration. The use the country code in the configuration variable CC_DENY of CSF.
    SUPPORT FACILITY | 24/7 TECH SUPPORT
    SERVER MANAGEMENT | WEB HOSTING SUPPORT | WP EXPERTS

  6. #6
    Quote Originally Posted by inspiron View Post
    If you are using CSF firewall then it has whole country block features. Also you can visit: http://www.ipdeny.com/ipblocks/ for Country Codes to use in CSF configuration. The use the country code in the configuration variable CC_DENY of CSF.

    Thanks! That website is useful. I'll try to compare the info with the one from MaxMind.

    I can't find the button for Country Codes in CSF configuration.

    If I copy the following amd paste it to edit csf.deny, will it work?

    / means the whole IP range right?

    41.75.192.0/20
    41.138.160.0/19
    41.139.64.0/18
    41.155.0.0/17
    41.184.0.0/16
    41.189.0.0/19
    41.190.0.0/19
    41.190.240.0/22
    41.191.108.0/22
    41.203.64.0/19
    41.203.96.0/19
    41.204.224.0/19
    41.205.160.0/19
    41.206.0.0/19
    41.206.224.0/19
    41.211.192.0/18
    41.215.244.0/22
    41.216.160.0/20
    41.216.232.0/22
    41.217.0.0/17
    41.217.204.0/22
    41.219.128.0/18
    41.219.192.0/18
    41.220.64.0/20
    41.221.112.0/20
    41.221.160.0/20
    41.222.40.0/21
    41.222.64.0/21
    41.222.72.0/21
    41.222.144.0/21
    41.222.208.0/22
    41.223.24.0/22
    41.223.64.0/22
    41.223.128.0/22
    41.223.136.0/22
    41.223.144.0/22
    41.223.168.0/22
    62.173.32.0/19
    62.193.160.0/19
    80.248.0.0/20
    80.250.32.0/20
    82.128.0.0/17
    193.189.0.0/18
    193.189.64.0/23
    193.189.128.0/24
    195.166.224.0/19
    196.1.176.0/20
    196.3.60.0/22
    196.3.180.0/22
    196.10.202.0/24
    196.22.6.0/24
    196.28.10.0/24
    196.29.208.0/20
    196.45.48.0/20
    196.45.192.0/18
    196.46.20.0/24
    196.46.144.0/22
    196.46.240.0/21
    196.200.0.0/20
    196.200.64.0/20
    196.200.112.0/20
    196.207.0.0/20
    196.207.128.0/22
    196.207.132.0/23
    196.216.144.0/22
    196.216.148.0/22
    196.216.251.0/24
    196.216.253.0/24
    196.216.255.0/24
    196.220.0.0/19
    212.100.64.0/19
    217.14.80.0/20
    217.117.0.0/20
    81.18.32.0/20
    Source: http://www.ipdeny.com/ipblocks/data/countries/ng.zone

Similar Threads

  1. Specific country hosting
    By Roligan in forum Specialty Hosting and Markets
    Replies: 6
    Last Post: 02-21-2009, 07:52 PM
  2. How do I block web filtering companies from visiting my website?
    By strato in forum Hosting Security and Technology
    Replies: 2
    Last Post: 08-22-2007, 06:46 AM
  3. How do I block all IP's from visiting my site except one?
    By Eiolon in forum Hosting Security and Technology
    Replies: 5
    Last Post: 01-26-2007, 03:29 PM
  4. Are IP addresses country specific?
    By Ron in forum Web Hosting Lounge
    Replies: 17
    Last Post: 04-30-2004, 02:40 PM
  5. Replies: 16
    Last Post: 11-22-2003, 05:50 AM

Posting Permissions

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