Hi I often find the discussions here well beyond my level of understanding, but never the less interesting...I expect that this question may be rather trivial, but this is the only place I could think where I may get an answer... I am trying to discover how I might find out all the IP ranges which are used in New Zealand. My ultimate goal is to check users visiting a website to see if they are connected to the internet within New Zealand and redirect them to different pages accordingly, much like Google seems to be able to do these days, ie when I enter www.google.com, I end up at www.google.co.nz, and I'm assuming that this is done based on the IP address of the machine I'm on...??.. Can anyone point me in the right direction for a source of this information...or if I'm heading in the wrong direction to achieve my goal, enlighten me as to how Google manages this... Thanks for any suggestions Steve +----------------------------------------------+ Steve Winter, Assistant Director National Science-Technology Roadshow Trust P.O. Box 598, Wellington New Zealand Phone +64 27 434 1577 Fax +64 8 326 3263 http://www.roadshow.org +----------------------------------------------+ - To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
On Fri, 7 Jun 2002, Steve Winter wrote:
Hi
I often find the discussions here well beyond my level of understanding, but never the less interesting...I expect that this question may be rather trivial, but this is the only place I could think where I may get an answer...
I am trying to discover how I might find out all the IP ranges which are used in New Zealand. My ultimate goal is to check users visiting a website to see if they are connected to the internet within New Zealand and redirect them to different pages accordingly, much like Google seems to be able to do these days, ie when I enter www.google.com, I end up at www.google.co.nz, and I'm assuming that this is done based on the IP address of the machine I'm on...??..
Can anyone point me in the right direction for a source of this information...or if I'm heading in the wrong direction to achieve my goal, enlighten me as to how Google manages this...
APNIC? -- Juha Saarinen - To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
used in New Zealand. My ultimate goal is to check users visiting a website to see if they are connected to the internet within New Zealand and redirect them to different pages accordingly, much like Google seems to be able to do these days, ie when I enter www.google.com, I end up at www.google.co.nz, and I'm assuming that this is done based on the IP address of the machine I'm on...??..
The way most people do it is by doing a reverse-dns lookup
on the ip address of the client and looking for .nz at the end
(for example) it will work most of the time.
I have a php script that does that if you are interested.
Probably, the only other way would be to get the AS numbers of all
the local ISP and then find out the address ranges they use, but of
course those keeps changing.
jfp.
------------------------------------------------------------------------
Jean-Francois Pirus
On Fri, 7 Jun 2002, Jean-Francois Pirus wrote:
used in New Zealand. My ultimate goal is to check users visiting a website to see if they are connected to the internet within New Zealand and redirect them to different pages accordingly, much like Google seems to be able to do these days, ie when I enter www.google.com, I end up at www.google.co.nz, and I'm assuming that this is done based on the IP address of the machine I'm on...??..
The way most people do it is by doing a reverse-dns lookup on the ip address of the client and looking for .nz at the end (for example) it will work most of the time.
I have a php script that does that if you are interested.
Probably, the only other way would be to get the AS numbers of all the local ISP and then find out the address ranges they use, but of course those keeps changing.
jfp.
It will work most of the time, but those few who do have .com reverse lookups will fail. I grab a national table from http://noc.win.co.nz/nationalroutes and it's not far off the mark (last time I checked). A national BGP feed is probably the most reliable as that's the way your traffic is going to travel. DNS and ASs sometimes aren't a reliable indicator. Then you have to weigh up the difference between the number of != .nz reverse lookups and missing networks from win and I guess you'll come to the better of the two. Chris -- - To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
At 5:52 PM +1200 6/7/02, Chris Hellberg wrote:
It will work most of the time, but those few who do have .com reverse lookups will fail.
What NZ ISP's have named their dial-up hostnames as .com instead of *.nz ? I guess it's not as bad as the UK. -- Andrew P. Gardner barcelona.com stolen, stmoritz.com stays. What's uniform about the UDRP? We could ask ICANN to send WIPO a clue, but do they have any to spare? Get active: http://www.tldlobby.com - To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
On Fri, Jun 07, 2002 at 01:23:36AM -0500, Andy Gardner wrote:
It will work most of the time, but those few who do have .com reverse lookups will fail. What NZ ISP's have named their dial-up hostnames as .com instead of *.nz ?
I guess it's not as bad as the UK.
Why limit it to dialup? I can think of at least timaru.com and ihug.net as non .nz reverses that are common. (only timaru.com for dialup though) Then there's the IP numbers without reverse dns... Ben. - To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
The hostnames of my home machine and my colocated machine both end in .net - but I still see google.co.nz, not google.com :) I suppose most people who are plain old ISP customers will have .nz hostnames, but there'll be others who dont... especially anyone who has their own domain name (we all know that .com's are generally cheaper than .nz's - I know a few of my clients have realised the same.) - and the ability to get their own DNS set up. At 01:23 7/06/02 -0500, Andy Gardner wrote:
At 5:52 PM +1200 6/7/02, Chris Hellberg wrote:
It will work most of the time, but those few who do have .com reverse lookups will fail.
What NZ ISP's have named their dial-up hostnames as .com instead of *.nz ?
I guess it's not as bad as the UK.
- To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
On Fri, Jun 07, 2002 at 06:36:14PM +1200, Mark Foster wrote:
(we all know that .com's are generally cheaper than .nz's - I know a few of my clients have realised the same.)
Yep - I don't think I'll ever register a .nz domain again. $15US a year for a .com is just so good in comparison. Good enough infact to just register them on a whim (ThursdayNightCurry.com etc ) =) Dean - To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
At 5:16 PM +1200 6/7/02, Jean-Francois Pirus wrote:
used in New Zealand. My ultimate goal is to check users visiting a website to see if they are connected to the internet within New Zealand and redirect them to different pages accordingly, much like Google seems to be able to do these days, ie when I enter www.google.com, I end up at www.google.co.nz, and I'm assuming that this is done based on the IP address of the machine I'm on...??..
The way most people do it is by doing a reverse-dns lookup on the ip address of the client and looking for .nz at the end (for example) it will work most of the time.
I have a php script that does that if you are interested.
If you're using Apache, you can do it easily (and much faster) with mod_rewrite (usually within your <virtualhost> container)... RewriteEngine On RewriteLogLevel 0 RewriteCond %{REMOTE_HOST} .*nz$ RewriteRule ^/index.html$ /indexnz.html [L]
Probably, the only other way would be to get the AS numbers of all the local ISP and then find out the address ranges they use, but of course those keeps changing.
Messy, if not extremely frustrating. -- Andrew P. Gardner barcelona.com stolen, stmoritz.com stays. What's uniform about the UDRP? We could ask ICANN to send WIPO a clue, but do they have any to spare? Get active: http://www.tldlobby.com - To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
On Fri, 7 Jun 2002, Andy Gardner wrote:
At 5:16 PM +1200 6/7/02, Jean-Francois Pirus wrote:
used in New Zealand. My ultimate goal is to check users visiting a website to see if they are connected to the internet within New Zealand and redirect them to different pages accordingly, much like Google seems to be able to do these days, ie when I enter www.google.com, I end up at www.google.co.nz, and I'm assuming that this is done based on the IP address of the machine I'm on...??..
The way most people do it is by doing a reverse-dns lookup on the ip address of the client and looking for .nz at the end (for example) it will work most of the time.
I have a php script that does that if you are interested.
If you're using Apache, you can do it easily (and much faster) with mod_rewrite (usually within your <virtualhost> container)...
RewriteEngine On RewriteLogLevel 0 RewriteCond %{REMOTE_HOST} .*nz$ RewriteRule ^/index.html$ /indexnz.html [L]
Assuming "HostnameLookups On" which will add [per client] initial connection overhead which is usually undesirable in high load scenarios. Messy. Matt. - To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
At 6:29 PM +1200 6/7/02, Matt Sullivan wrote:
RewriteEngine On RewriteLogLevel 0 RewriteCond %{REMOTE_HOST} .*nz$ RewriteRule ^/index.html$ /indexnz.html [L]
Assuming "HostnameLookups On" which will add [per client] initial connection overhead which is usually undesirable in high load scenarios.
True, depending on how well connected you are to your local DNS pump, and how big their cache is.
Messy.
ish. -- Andrew P. Gardner barcelona.com stolen, stmoritz.com stays. What's uniform about the UDRP? We could ask ICANN to send WIPO a clue, but do they have any to spare? Get active: http://www.tldlobby.com - To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
On Fri, Jun 07, 2002 at 04:19:16PM +1200, Steve Winter wrote:
Can anyone point me in the right direction for a source of this information...or if I'm heading in the wrong direction to achieve my goal, enlighten me as to how Google manages this...
I imagine Google does this by mining the RIR whois data, which will probably give them a geographic mapping which is sufficiently accurate to be useful. If you need accurate data for billing or something, you need to define the question better: for example, the fact that one ISP will route your packets to a particular destination without taking them out of the country is no guarantee that another provider will (or that the return path will stay in-country). Joe - To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
On Fri, 7 Jun 2002, Steve Winter wrote:
Can anyone point me in the right direction for a source of this information...or if I'm heading in the wrong direction to achieve my goal, enlighten me as to how Google manages this...
I've read all the other responses about this, and they are all fairly standard -- do it by reverse lookup (not very reliable) or by collecting a listing of networks using routing tables (better but somewhat cumbersome). I do believe that Google and many banner advertises use the services of a company who's name eludes me... However I read about them last year. Their entire business in IP address geo-location, they employ people full-time to keep track of the geographical locations of IP addresses (to the city level in some cases I believe). -- Dylan Reeve - dylan(a)wibble.net It's just not cricket. - To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
At 4:49 PM +1200 6/8/02, Dylan Reeve wrote:
I do believe that Google and many banner advertises use the services of a company who's name eludes me... However I read about them last year.
That reminds me. There is an Apache module for geo-ip. That might be exactly what Steve needs. http://geo-ip.com/downloads/mod_geoip/ -- Andrew P. Gardner barcelona.com stolen, stmoritz.com stays. What's uniform about the UDRP? We could ask ICANN to send WIPO a clue, but do they have any to spare? Get active: http://www.tldlobby.com - To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
claiming to be Andy Gardner,
Dead link (well, it was when I tried it) try this one: http://maxmind.com/geoip/api/mod_geoip.shtml Would ISPs be able to use this service to determine charging for national/international traffic, or would that not work because not all national traffic stays national? Michael - To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
On Sat, Jun 08, 2002 at 06:33:43PM +1200, Michael Jager wrote:
Would ISPs be able to use this service to determine charging for national/international traffic,
If they had a contract with their customers that said "you get billed at rate X for traffic to or from this particular set of addresses, and at rate Y for other traffic", it would seem like the only service usable for rating. Otherwise, no. Ixia provide that kind of service, incidentally: http://www.ixiacom.com/products/paa/netops/IxMapping.php I've never used it, so I don't know how good it is.
or would that not work because not all national traffic stays national?
The clear sales people used to sell people bundles based on "national" and "international" taffic, but that's really not what they were selling. The "national" category consisted of packets carried within clear's network towards their destination (or from the source, for inbound traffic to the customer) without crossing one of clear's international circuits; the "international" category was everything else. In other words, the distinction was enforced through measurement and control on the international circuits themselves, and not by measuring general traffic and rating it afterwards. So, you need to describe your terms more exactly. Under clear's use of "national traffic", all national traffic "stays national" by definition, and your question makes no sense. Joe - To unsubscribe from nznog, send email to majordomo(a)list.waikato.ac.nz where the body of your message reads: unsubscribe nznog
participants (12)
-
Andy Gardner
-
Ben Aitchison
-
Chris Hellberg
-
Dean Pemberton
-
Dylan Reeve
-
Jean-Francois Pirus
-
Joe Abley
-
Juha Saarinen
-
Mark Foster
-
Matt Sullivan
-
Michael Jager
-
Steve Winter