Page 1 of 1

Blocking certain IPs access to your web site

PostPosted: Fri Sep 08, 2006 10:51 pm
by Saxquest
I've been getting tons of spam on my web site in the form of postings from Nigeria and Indonesia. I have no need for people in these countries to even be on my web site. Is there a way to find out what specific block of IPs are generated from these countries so that I can deny their access to my web site?

Mark Overton

PostPosted: Mon Sep 11, 2006 7:38 am
by robocoder
Yes. Multiple ways. Two of the better ones are:

Use the API, documented at (specifically, Give it an IP address, get back a country. Simple.

Or download (and possibly, host) your own local copy (or subset thereof) of the database. A little more complicated, but worth the effort if you need faster responses to your queries and/or you have a lot of queries. In addition, you cut down on off-site network traffic.

Also, you can handle your unwanted visitors in a number of ways, including:
  • pop-up message
  • dynamic redirect
  • add a netblock to your firewall rules