PDA

View Full Version : How to block IP addresses by country?


Durad
November 10th, 2006, 01:13 AM
Is there a way to block all countires except Canada?

I have local forum and once I did mistake and posted my forum on some other forum to let users vote about its look. This was my big mistake.

A lot of spammers are comming from that site.

Is there a way to block all IP's that does not belong to Canada?

TNT
November 10th, 2006, 09:17 AM
-{ Quote: "Is there a way to block all countires except Canada?

I have local forum and once I did mistake and posted my forum on some other forum to let users vote about its look. This was my big mistake.

A lot of spammers are comming from that site.

Is there a way to block all IP's that does not belong to Canada?" }-There is a way, but it has to be done "manually": what you can do is take a list of all known Internet Service Providers in Canada, and put a regular expression in the server side code (PHP for instance) that displays only a blank page unless the regular expression matches one of the IPs of Canada.