{from those archives} 10 years...??? blimey. http://list.waikato.ac.nz/pipermail/nznog/2005-June/010239.html Perhaps the way to go about it will end up being to legislate, that you'll end up having to register your "NZ" IP address allocation with the Intellectual Property Office - because they like the acronym IP too. But, this of course will still ensure there is much humour to be had. https://www.fyi.org.nz/request/1830-ip-address-range On 20/09/15 01:00, nznog-request(a)list.waikato.ac.nz wrote:
Send NZNOG mailing list submissions to nznog(a)list.waikato.ac.nz
To subscribe or unsubscribe via the World Wide Web, visit http://list.waikato.ac.nz/mailman/listinfo/nznog or, via email, send a message with subject or body 'help' to nznog-request(a)list.waikato.ac.nz
You can reach the person managing the list at nznog-owner(a)list.waikato.ac.nz
When replying, please edit your Subject line so it is more specific than "Re: Contents of NZNOG digest..."
Today's Topics:
1. nz ip range (bigalownz) 2. Re: nz ip range (Jethro Carr)
----------------------------------------------------------------------
Message: 1 Date: Sat, 19 Sep 2015 23:35:28 +1200 From: "bigalownz"
To: Subject: [nznog] nz ip range Message-ID: Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original im doing a little project and im looking for a script to get nz ip ranges
i did a Google search and found this, but as you can see it was from 2005 and out dated, the url doesn't work etc i need some help to update it thanks
#!/usr/local/bin/php
$in_file = "ftp://ftp.apnic.net/pub/apnic/dbase/data/country-ipv4.lst"; // $in_file = "country-ipv4.lst"; $out_file = "nzipranges.txt";
$handle_input = @fopen($in_file,"r") or die("Unable to open $in_file\n\n");
$handle_output = fopen($out_file, "w");
$now = date ("r");
fwrite ($handle_output,"# Generated: $now\n\n");
while (!feof($handle_input)) { $buffer = fgets($handle_input); if ( ereg ( "nz", $buffer) ) { // echo $buffer; $this_range = trim(preg_replace ( "#([\d\.]+) \- [\d\.]+ : [\d\.]+(\/\d+) .+#","$1$2", $buffer )); fwrite ($handle_output,"\n" . $this_range); } } fclose($handle_input);
fwrite ($handle_output,"\n"); fclose($handle_output);
?>
------------------------------
Message: 2 Date: Sat, 19 Sep 2015 23:49:35 +1200 From: Jethro Carr
To: bigalownz , nznog(a)list.waikato.ac.nz Subject: Re: [nznog] nz ip range Message-ID: Content-Type: text/plain; charset="utf-8" Hi bigalownz,
I wrote a Puppet module that you can use to pull IP address lists from various registries. If you?re using Puppet, it means you can get an array of all the IPs for a specific region (such as NZ) for use in configuration files or resources.
https://github.com/jethrocarr/puppet-rirs
If you?re not using Puppet, the good news is that it?s almost entirely Ruby, so you could take a look at the function and adapt it very quickly to be a standalone script.
https://github.com/jethrocarr/puppet-rirs/blob/master/lib/puppet/parser/func...
regards, Jethro
-- Jethro Carr www.jethrocarr.com
On 19 September 2015 at 23:34:33, bigalownz (bigalownz(a)gmail.com) wrote:
im doing a little project and im looking for a script to get nz ip ranges
i did a Google search and found this, but as you can see it was from 2005 and out dated, the url doesn't work etc i need some help to update it thanks
#!/usr/local/bin/php
$in_file = "ftp://ftp.apnic.net/pub/apnic/dbase/data/country-ipv4.lst"; // $in_file = "country-ipv4.lst"; $out_file = "nzipranges.txt";
$handle_input = @fopen($in_file,"r") or die("Unable to open $in_file\n\n");
$handle_output = fopen($out_file, "w");
$now = date ("r");
fwrite ($handle_output,"# Generated: $now\n\n");
while (!feof($handle_input)) { $buffer = fgets($handle_input); if ( ereg ( "nz", $buffer) ) { // echo $buffer; $this_range = trim(preg_replace ( "#([\d\.]+) \- [\d\.]+ : [\d\.]+(\/\d+) .+#","$1$2", $buffer )); fwrite ($handle_output,"\n" . $this_range); } } fclose($handle_input);
fwrite ($handle_output,"\n"); fclose($handle_output);
?>
_______________________________________________ NZNOG mailing list NZNOG(a)list.waikato.ac.nz http://list.waikato.ac.nz/mailman/listinfo/nznog
------------------------------
_______________________________________________ NZNOG mailing list NZNOG(a)list.waikato.ac.nz http://list.waikato.ac.nz/mailman/listinfo/nznog
End of NZNOG Digest, Vol 153, Issue 16 **************************************
On 22 September 2015 at 00:39, Kerry Milestone
"Identifying New Zealand resident customers" for on-line GST based on IP address will work for them then, if few others. http://www.beehive.govt.nz/sites/all/files/Online-GST-discussion-document-SU... Hamish. -- https://www.onename.io/hamishmacewan
participants (2)
-
Hamish MacEwan
-
Kerry Milestone