Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP - Country codes??

Status
Not open for further replies.

Dodgerweb

Technical User
Sep 14, 2005
7
0
0
US
Hi all,

I have a question about IP addresses and whether or not you can identify a country by the first octet of the IP address.

In other words - if I see an address othat begins with "217" can I assume that this is Germany/Netherlands?

The reason I ask is that I get a lot of contact form abuse and it seems to come from countries such as Iran, Italy, Korea, etc... seeing as how folks from those countries would not be interested in our "localized" forum or site I would like to ban the entire country... by using 217.*.*.* in either the forum ip banning or with Cpanel IP Deny. Nothing again the fine people in those, above mentioned, countries but if there is no reason for them to be on the site and I can knock out any/all spammers from that area then I want to do so. ;)

But ... I don't want to ban an IP that could be from a local area ...
 
there is no way to identify the country that an ip belongs to. The reason is that even if some ip blocks had been purchased from a Netherland ISP, this ISP may reselled them to other ISPs in other countries. The way that many sites identify your country is by looking through the host than an ISP assigns to each ip address.
However is very common to see a big ip range to belong in a specific country.

Hope that helped
 
Even if it was the case (which it isn't), all your neuisance members would have to do is use, for example, a US (or indeed any other country) based proxy server, which would disguise their source address from your website, and voila, they have access again, because their IP address will appear to your site as the address of the proxy, and not their own.

What you want to do won't suceed if the offending users are stubborn enough, and it will just drive you mad.

However, you may remeber that at the last election in the US, nobody outside of the US could access Bush's site....so perhaps there is something like this which you could use which will be far more effective than blocking IP ranges...although as before, a proxy could still be used.



'When all else fails.......read the manual'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top