Results 1 to 6 of 6
-
10-15-2009, 04:57 AM #1Junior Guru
- Join Date
- Sep 2005
- Posts
- 201
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.
-
10-15-2009, 04:59 AM #2Total Nerd
- 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
-
10-15-2009, 05:24 AM #3Junior Guru
- Join Date
- Sep 2005
- Posts
- 201
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.
-
10-15-2009, 05:53 AM #4Total Nerd
- 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
-
10-15-2009, 07:50 AM #5Support Facility
- Join Date
- Jun 2009
- Posts
- 2,335
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.
-
10-15-2009, 08:53 AM #6Junior Guru
- Join Date
- Sep 2005
- Posts
- 201
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
Similar Threads
-
Specific country hosting
By Roligan in forum Specialty Hosting and MarketsReplies: 6Last Post: 02-21-2009, 07:52 PM -
How do I block web filtering companies from visiting my website?
By strato in forum Hosting Security and TechnologyReplies: 2Last Post: 08-22-2007, 06:46 AM -
How do I block all IP's from visiting my site except one?
By Eiolon in forum Hosting Security and TechnologyReplies: 5Last Post: 01-26-2007, 03:29 PM -
Are IP addresses country specific?
By Ron in forum Web Hosting LoungeReplies: 17Last Post: 04-30-2004, 02:40 PM -
Strange question: is it possible to block access to a website for an entire country?
By Max Renn in forum Hosting Security and TechnologyReplies: 16Last Post: 11-22-2003, 05:50 AM