Forum Moderators: phranque

Message Too Old, No Replies

What is the IP of localhost

when testing site on my machine

         

irishaff

6:48 am on Dec 27, 2004 (gmt 0)

10+ Year Member



Hi,

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

jdMorgan

7:15 am on Dec 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, the localhost address is 127.0.0.1 -- that's always the local host, or "this machine right here," rather than the address of "this machine" on your local network. You might want to include your local network address(es) as well, which might be 192.168.x.x, 90.0.x.x, 10.x.x.x, or an address in one of the other non-routable IANA-reserved address ranges. (You might want to include your local network address(es) as well.)

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

irishaff

7:50 am on Dec 27, 2004 (gmt 0)

10+ Year Member



Thank Jim, this gives me a starting point.

David

benevolent001

8:03 am on Dec 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



irishaff

Please also give me install instructions for this...
i too wanted to use geoip but didnt got how to do it...please do tell me when you finish

With Regards

d_fused

9:02 am on Dec 27, 2004 (gmt 0)

10+ Year Member



Maybe it is a bit off-topic, but I thought it might be useful.

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

benevolent001

1:05 pm on Dec 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I loaded GeoIP.dat file in my website www folder

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

?