Blocking certain IPs access to your web site

General Discussion about IP Address Lookup caveats, technology, ideas, etc.

Moderator: Moderators

Blocking certain IPs access to your web site

Postby Saxquest on Fri Sep 08, 2006 10:51 pm

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?

Thanks,
Mark Overton
http://www.saxquest.com
Saxquest
n00b
 
Posts: 1
Joined: Fri Sep 08, 2006 10:42 pm
Location: St. Louis

Postby robocoder on Mon Sep 11, 2006 7:38 am

Yes. Multiple ways. Two of the better ones are:

Use the hostip.info API, documented at http://www.hostip.info/use.html (specifically, http://api.hostip.info/country.php). Give it an IP address, get back a country. Simple.

Or download (and possibly, host) your own local copy (or subset thereof) of the hostip.info 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
User avatar
robocoder
Veteran
 
Posts: 105
Joined: Sat Mar 25, 2006 8:10 pm
Location: Ontario, Canada


Return to IP Address Lookup

Who is online

Users browsing this forum: No registered users and 5 guests

cron