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!

  1. June 17th, 2009 at 10:23 | #1

    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

  2. Anthony
    July 30th, 2009 at 09:19 | #2

    A great service!

    Thank you for the information.

    Thanks,
    Anthony

  3. Rob
    August 17th, 2009 at 06:09 | #3

    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

  4. MC
    August 30th, 2009 at 23:14 | #4

    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.

  5. MC
    September 4th, 2009 at 14:13 | #5

    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

  6. admin
    September 8th, 2009 at 09:57 | #6

    @MC
    You first need to check with godaddy to see if they allow the use of .htaccess files with your specific hosting plan.

  7. RS
    October 5th, 2009 at 20:41 | #7

    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

  8. RS
    October 5th, 2009 at 20:53 | #8

    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.

  9. admin
    October 6th, 2009 at 09:59 | #9

    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

  10. RS
    October 7th, 2009 at 06:55 | #10

    Super duper.. had to come back to see what you thought. :)

  11. DTH
    October 7th, 2009 at 10:44 | #11

    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

  12. admin
    October 7th, 2009 at 11:26 | #12

    @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.

  13. KEP
    October 17th, 2009 at 01:51 | #13

    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!

  14. admin
    October 26th, 2009 at 11:06 | #14

    @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:

    <Limit GET HEAD POST>
    order allow,deny
    deny from 64.57.64.57
    allow from all
    </Limit>

    If you wanted to block the entire range containing the above IP you could instead use the following:

    <Limit GET HEAD POST>
    order allow,deny
    deny from 64.57.64.0/19
    allow from all
    </Limit>
     

    As you state you are not an expert we recommend getting some assistance from someone familiar with your specific situation.

  15. cs
    November 5th, 2009 at 17:18 | #15

    Hi, no results from the following:

    # Country: KOREA, DEMOCRATIC PEOPLE’S REPUBLIC OF
    # ISO Code: KP
    # Total Networks: 0
    # Total Subnets: 0

  16. admin
    November 9th, 2009 at 08:39 | #16

    You are correct.

  17. Fred
    November 15th, 2009 at 18:17 | #17

    Wonderful service. Thanks!

  18. RB
    November 30th, 2009 at 14:52 | #18

    Is a tool available that can accept a list of IP addresses and simplify/shorten it as much as possible?

  19. admin
    December 1st, 2009 at 16:39 | #19

    We are working on such a tool and hope to have it available in 2010.

  20. Stony
    December 9th, 2009 at 16:16 | #20

    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.

  21. December 23rd, 2009 at 19:25 | #21

    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.

  22. Agreed..
    January 14th, 2010 at 15:21 | #22

    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.

  23. January 18th, 2010 at 14:08 | #23

    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

  24. Stewart White
    January 19th, 2010 at 10:54 | #24

    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.

  25. March 9th, 2010 at 20:03 | #25

    Hi, This is a great reference. I though am not so script savvy and wondered if you can help with something. I currently am using .htaccess to use your blocks and I do use that same file for other things in my site. I don’t like to play with a file like that too frequently. I use cPanel and wondered if all that you have talked about here has anything in reference to automatically updating IP Blocks. Also, in my admin part of my site I have the ability to block IPs as well. I wondered if one of your files I can simply import to the php database for example.

    Thank you for such a great site and reference.

    Ken

  26. Dana
    March 18th, 2010 at 19:00 | #26

    Thanks for the great recourse, it is a valuable tool for spam reduction/hacking attempts. It would be nice to have the option to block by continent. Keep up the great work!

  27. Emile
    April 9th, 2010 at 04:23 | #27

    Thanks for this service.

    I couldn’t find an email address anywhere on your website, in case I’d want to start a conversation about reusing the data that you have in a service.

    You have my email address now (had to put it in to be able to post), so please contact me :)

  28. Bob
    April 10th, 2010 at 03:04 | #28

    Can you rename my country as Taiwan, not “Taiwan, Province of China”? All people on earth know Taiwan is not part of China, except China communist government.

  29. Stewart White
    April 12th, 2010 at 11:02 | #29

    While it is not our desire to enter into a geopolitical debate about the current names or designations of specific countries, we will take your request under advisement.

  30. Stewart White
    April 12th, 2010 at 11:09 | #30

    We have sent you an email in response to your post.

  31. April 12th, 2010 at 17:07 | #31

    I am working on a new !joomla Website and I came across your site while researching the security checklist. I think that this one of the best resources I have found so far for blocking I.P addresses.

    This brings me to 2 questions….
    Do you provide access to your IP data in a remotely accessible format (IE can I link to your table data for importing updates to my .htaccess files) and 2. would you consider supporting a !Joomla Admin component that would allow potential customers/ site traffic to rely on your database as a resource for providing IP blocking security to their sites? Just a thought…

  32. Stewart White
    April 12th, 2010 at 18:03 | #32

    We are currently contemplating a module to allow remote access to our database. If we proceed with this project it would enable valid users to have read only access to specific tables in the database.

    We would consider supporting a Joomla Admin component to process and use our data.

  33. Julio
    May 28th, 2010 at 05:28 | #33

    Your website is awesome! Let the public know if there is any funding option needed!

    Ready to collab!

    Cheers from Ireland

  34. Stewart White
    May 28th, 2010 at 10:44 | #34

    Thank you for the kind comments. We are always open to ideas. If you have some please let us know.

  35. July 29th, 2010 at 11:30 | #35

    @Stewart White
    Stewart, great site! I love it and use it all of the time.

    Two really good ideas I have…

    First: When selecting from that list. I always have to hold down Ctrl and scroll through all of the countries and click each one. Sometimes I let go of Ctrl and I have to start clicking all over again. Would be cool if there was a side by side selection. Where the select window was on one side and you can select one and click a button and it would copy that single selection to another select window. So you can like build your list that way.

    Second: When clicking the button to process the country list, if there are a ton of entries, it takes forever for all that info to load in the browser and literally slows down my beefy computer to copy and paste that whole window into textpad. Because when I select my countries there are over 10,000 CIDR entries (lines). So, instead of opening another window and listing all of the entries, just have it open a pre-processed txt file so I can save it to my desktop.

    Thanks again,

    Shawn

  1. No trackbacks yet.