i want to only allow website visitors from australia. has anyone done this before?
|
feedback
|
migrated from stackoverflow.com Dec 22 '09 at 14:40
This question came from our site for professional and enthusiast programmers.
|
You are looking for GeoIP data to base your restrictions on. There are lots of resources for this kind of thing around. However, this is not foolproof and can be circumvented, for example by people using a proxy in Australia. | |||
|
feedback
|
|
Try a service such as http://www.maxmind.com/ or http://hostip.info/ They can tell you where a user is located. | |||
|
feedback
|
|
For Apache, you can get the free service from http://www.ip2location.com/blockvisitorsbycountry.aspx For IIS, you will need to install the ISAPI for blocking purpose. | |||
|
feedback
|
|
to be honest I have tried this, and it has never been a good idea. Even with a paid maxmind database I have had verified locals not being able to access the site. Several reasons come to mind, they maybe using a secure proxy to filter content or whatever. If you are doing this for a limited set of visitors (like employees of a company) or to reduce possibility of attacks from outside source then yes its a workable solution. In all cases, for production WWW I have had to eventually remove the country specific filters. | |||
|
feedback
|