About
Everything You Wanted to Know About Country IP Blocks
Are you frustrated with malicious attacks originating from specific countries?
We were too! We responded to these threats by creating a database filled with country specific network data. The output of this data enables you to block or allow as few or as many countries as your security requires.
We exist to help protect your security
Country IP Blocks was created as a resource to protect servers, systems and websites from spam, malware, cross-site scripting, website hijacking, hacking, cracking and other malicious activities. When properly implemented, using our network data in your security scripts, firewalls, Access Control Lists or .htaccess files will dramatically improve your I.T. security.
The Country IP Database
Our database contains up to the minute network information on nearly 250 countries worldwide. We provide the data free of charge in CIDR and Netmask format.
We Update Our Database Daily
Our Country IP Database was designed with two goals in mind: Accuracy and availability. The database is derived directly from the Registry sources and is updated as often as the Regional Registries provide new or altered network allocations. This means we update our entire Country IP Database at least daily or more often as required.
We Want to Help Webmasters
Using our Country IP Database, webmasters can instantly create .htaccess deny and .htaccess allow files. Webmasters can easily block the country or countries of their choice by making a simple selection.
We Are a Resource to Networking Professionals
Accurate network data is important to Information Technology Professionals and Network Administrators. Those responsible for the security of your network can be assured they are getting the most accurate data available from the registrars. We offer the choice of CIDR or Netmask formats and instantly generate the data of choice.
Coming soon we will offer a greater variety of security scripts with Access Control Lists (ACLs) in vendor formats.
We Made our Database Searchable
All allocated network addresses are completely searchable in the Country IP Database. The Search results reveal the country and network data related to the IP search string.
We Provide Custom Network Data Services
Our programmers and database administrators can create custom scripts and custom data streams for your special needs. Contact us for more details.
We Want to Be Part of Your Web Security
We provide image and text links for your websites. Country IP Blocks data is free to use. We only ask that you let the world know you are serious about security by adding a link to Country IP Blocks on your website.
Stop Malicious Activity Now
The internet will never be completely secure; but you can take measures to reduce the number of attacks against your networks, systems and websites when you preemptively block problem countries. Why wait? Start using Country IP Blocks today!
Dear Sirs,
Thanks you for great service. It is best tool which i ever use to ban the IP from Vietnam.
Thanks you again.
VU KIMSON
Sale administrator
KIMSON Handicraft Co., LTD
A great service!
Thank you for the information.
Thanks,
Anthony
My firewalls are so noisy with traffic, I don’t know where to begin. But your website helps me to create the necessary deny rules to cut down the noise to a manageable level. Its far easier to allow traffic to questionable zones then to just allow “all” and block only when “discovered”.
Thanks a billion and keep up the good work.
Rob
Hi…whenever I try to add the .htaccess deny code to my .htaccess file, I get a Server Error 500. I’m on GoDaddy, and using FileZilla with the transfer mode set to ASCII. I’ve heard of using Cpanel, but GoDaddy doesn’t seem to have that.
Got a spam message from the following IP in Brazil – seems this company’s IPs aren’t on anyone’s list yet:
189.27.177.184
@MC
You first need to check with godaddy to see if they allow the use of .htaccess files with your specific hosting plan.
This would be pretty good if you would add a true iptables script. Where it output in complete iptables format. Many firewalls do not support full blown blacklist by subnet. But if it generated complete iptables rules for each of the subnet, you could dump it and run a simple script to block.
Just some thoughts
iptables -A INPUT -s 62.217.192.0/18 -m state –state NEW -j DROP
And create a script that adds the iptables -A INPUT -s to the front,
and -m state –state NEW -j DROP to the rear of your IP block lists.
This would be very helpful. Not too many admins are willing to change firewalls, or scripts all the time. And as I mentioned, many of the scripts will not allow for having a list in the formats that you have on the site.
I would add an iptables format to your site. and then have your script generate the iptables commands for the lists you already have.
This would be “very” useful.
We are giving your suggestion some serious thought. In fact the consideration has been on the table for the past few months but you are the first visitor to make the request.@RS
Super duper.. had to come back to see what you thought.
Do you have an external API where your db can be queried (for input into iptables, etc)?
Also, how frequently to you verify your db information?
Lastly, this is great, as I have been looking for this (or do it myself) for a long time now.
-DTH
@DTH
We are currently developing some external API’s for autom queries. We are also working on an app for webmasters.
We update and verify our entire database on a daily basis.
We’re pleased you like our service. Please tell a friend about us.
Hi,
My site is private and no one knows about it. I check my access logs and I see some guys from Turkey. I copied and paste the entire deny codes from your site but there are some that aren’t on it because I still see them around. Sorry but I’m not an expert in IPs at all. My questions are:
1) Doesn’t a user’s ip address changes constantly?
2) If so, how do you block that user if his ip keeps changing?
3) For example, if his IP is 64.57.64.57 for today and tomorrow it’s something else, how do you go about blocking him?
4) Can you provide a sample deny code with above ip address to get an idea how the code is structured?
Thank you!
@KEP
In answer to your questions:
1.) IP addresses change constantly if they are using dynamic addressing schemes. THis includes DHCP type assignments or the use of proxies to mask the originating IP. Static IPs remain the same.
2.) Blocking rapidly changing IPs requires a little forethought and planning. If the IP address is changing merely because it is a DHCP address assigned to a specific block of IPs, you can proactively block the IP. You can block proxies. You can also block an entire country or continent or allow access to your hidden site to only specific IP addresses.
3.) IP address 64.57.64.57 is assigned to the 64.57.64.0/19 address range. You can block the entire range.
4.) We can provide sample code and in fact already do. But to provide you better service it would help to know what method you are using to filter IPs. Are you using a firewall (hardware/software)? Are you using .htaccess?
If you are using .htaccess and wish to block 64.57.64.57 you could create an .htaccess file using the following text:
If you wanted to block the entire range containing the above IP you could instead use the following:
As you state you are not an expert we recommend getting some assistance from someone familiar with your specific situation.
Hi, no results from the following:
# Country: KOREA, DEMOCRATIC PEOPLE’S REPUBLIC OF
# ISO Code: KP
# Total Networks: 0
# Total Subnets: 0
You are correct.
Wonderful service. Thanks!
Is a tool available that can accept a list of IP addresses and simplify/shorten it as much as possible?
We are working on such a tool and hope to have it available in 2010.
Hello, I’m wondering if it is possible to block ip’s by states (in USA) using the htaccess format and where I can find the ranges. Regards.
Thank you for making this website, I had thought we needed a site like this before. I personally am a big fan of banning whole countries, and do it on a lot of my sites or servers where I am, quite frankly, not the least bit interested in serving russian customers, or whatever. For sites that are only meant for a single country, or say, english speaking westerners, banning the notorious countries (russia, india, north korea, all of africa, etc) reduces almost all your spam.
I agree with the iptables list. I ultimately just use your lists (with a little bit of doctoring via vi) to just flat out deny postfix connections. Works well.
iptables -I input -s subnet/cidr -j DROP # Country name i.e. china
would really be quite wonderful.
I cant seem to find an actual answer to this thought google, my sites country specific so i used the allow script to only allow the ip ranges within my country as my site serves absolutely no purpose to anyone in any other country.
By using this allow/block method/s does that also mean that if America is blocked am i then effectively blocking all American search engines like google and yahoo or do they fall outside the provided range and if not could you perhaps point me in the direction of blocking countries but allowing specific bots.
Thanks
When you block an country you are blocking traffic from IP ranges assigned or allocated to that country. This will include bots emanating from within those addresses. Google does utilize bots within a variety of countries. However, Google does not publish the IP addresses of these bots.
We recommend you monitor your bot traffic and then Verify Googlebot using the instructions located at Google Webmaster Central.