Forum Moderators: phranque
I use GEO IP software on my site. I am about to start testing locally and want to exclude the GEO script for my local machine. Only one small snag.. i dont know what IP to exclude .. is it the IP of my machine on the network? 127.0.0.1 etc. Im going to test using IIS localhost on XP pro and the pages are ASP.
Any advice would be most welcome.
David
You can find your local machine's network address in the TCP/IP settings of "My Network Places" under Windows' Control Panel. If you have DHCP enabled, this address might change, so you'd want to exclude the entire range of possible local addresses that DHCP might assign to the machine. How you'd exclude a range of addresses depends on what format GeoIP accepts (I don't know), but generally, you'd enter it as a range (192.168.0.1-192.168.0.254), an address with a netmask 192.168.0.0/255.255.255.0, or as a CIDR specification like 192.168.0.0/24.
Jim
There is a free geoip data file available on the net which can be easily entered into a mysql or any other db.
This might be useful when you are using shared hosting, but still want to geo target your visitors.
I have done some testing and it does pretty well.
Since drop urls are not permitted here, please sticky me for more details. I can either point you the correct download location and send you some instructions on how to easily implement the data, or upload a mysql dump somewhere so you can start using it in minutes.
regards
and placed following code in my htaccess file,I got code from maxmind website to test blocking
GeoIPEnable On
GeoIPDBFile GeoIP.dat
SetEnvIf GEOIP_COUNTRY_CODE CN BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE RU BlockCountry
# ... place more countries here
Deny from env=BlockCountry
this gives internal server error
?