HZNET Logo
Horizonal Line

Tools

IPv6

  • Generate unique local IPv6 unicast addresses (ULA)
    (See also RFC 4193)
    or
  • create one via the online tool on the kame website.
  • You could also register your Unique local Unicast addresse on a website maintained by the non profit SixXS project.

  • A shell skript to set up a 6to4 tunnel on a Linux host

  • gen6dns is a tool to generate static DNS records (AAAA and PTR) for hosts using Stateless Address Autoconfig (SLAAC).
    If you have a list of hostnames, mac addresses and ipv6 subnets gen6dns generates the appropriate AAAA and PTR records for you.
    It supports also the generation of static ip addresses and optionally the generation of CNAME records pointing to a subdomain for those hosts which are using DDNS to update there current ip address.
    $ cat hosts.txt
    ;name   mac_address             ipv6_subnet_or_host_address
    horst   00:17:53:85:80:3b       0:0:0:a0b1::/64		; host using SLAAC
    dns1                            0:0:0:e::53/128		; A static configured host
    dns2                            0:0:0:f::53/128		; another static configured host
            001335a291f4            0:0:0:a0b1::/64		; host w/o a name
    mobile							; host using Dynamic DNS to update the current ip in subdomain dyn.example.net
    
    $ gen6dns -S -f -r -o example.net -p 2001:db8:affa::/48 hosts.txt
    horst                            IN  AAAA       2001:db8:affa:a0b1:217:53ff:fe85:803b
    b.3.0.8.5.8.e.f.f.f.3.5.7.1.2.0  IN  PTR        horst.example.net. ; a0b1
    dns1                             IN  AAAA       2001:db8:affa:e::53
    3.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0  IN  PTR        dns1.example.net. ; 000e
    dns2                             IN  AAAA       2001:db8:affa:f::53
    3.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0  IN  PTR        dns2.example.net. ; 000f
    host001335a291f4                 IN  AAAA       2001:db8:affa:1:213:35ff:fea2:91f4
    4.f.1.9.2.a.e.f.f.f.5.3.3.1.2.0  IN  PTR        host001335a291f4.example.net. ; a0b1
    
    The command is able to write the resource records into separate files for forward and all reverse zones. For ease of BIND configuration it's able to produce a sample bind config:
    $ gen6dns --bind-config --multiline --write --dynamic-domain=dyn -S --forward --reverse --origin example.net --6to4 192.0.2.1 hosts.txt
    zone "example.net." in {
            type master;
            file "db.example.net.";
    };
    zone "e.0.0.0.1.0.2.0.0.0.0.c.2.0.0.2.ip6.arpa." in {
            type master;
            file "db.000e";
    };
    zone "f.0.0.0.1.0.2.0.0.0.0.c.2.0.0.2.ip6.arpa." in {
            type master;
            file "db.000f";
    };
    zone "1.b.0.a.1.0.2.0.0.0.0.c.2.0.0.2.ip6.arpa." in {
            type master;
            file "db.a0b1";
    };
    
    The generated filenames have a prefix of "g6d." and should be INCLUDED into the corresponding zone config file.
    $ ls -l g6d.*
    -rw-r--r-- 1 dns dnsadmin  66 Jun 10 15:30 g6d.000e
    -rw-r--r-- 1 dns dnsadmin  66 Jun 10 15:30 g6d.000f
    -rw-r--r-- 1 dns dnsadmin  67 Jun 10 15:30 g6d.a0b1
    -rw-r--r-- 1 dns dnsadmin 363 Jun 10 15:30 g6d.example.net.
    
    $ cat g6d.a0b1
    4.f.1.9.2.a.e.f.f.f.5.3.3.1.2.0  IN  PTR        host001335a291f4.example.net. ; 0001
    b.3.0.8.5.8.e.f.f.f.3.5.7.1.2.0  IN  PTR        horst.example.net. ; a0b1
    
    $ cat g6d.000e
    3.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0  IN  PTR        dns1.example.net. ; 000e
    
    $ cat g6d.000f
    3.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0  IN  PTR        dns2.example.net. ; 000f
    
    $ cat g6d.example.net.
    horst                            IN  AAAA       2002:c000:201:a0b1:217:53ff:fe85:803b
    dns1                             IN  AAAA       2002:c000:201:e::53
    dns2                             IN  AAAA       2002:c000:201:f::53
    host001335a291f4                 IN  AAAA       2002:c000:201:1:213:35ff:fea2:91f4
    mobile                           IN  CNAME      mobile.dyn.example.net.
    
    The splitting of the reverse records into separate zone files is controlled by the optional argument to parameter -r.
    If someone wants to use only one file for all reverse zones the option --reverse=48 will do the job.

    See also the presentation I've given at the German IPv6 Kongress about IPv6 DNS provisioning and gen6dns.

    There are to versions of gen6dns available:

    1. A full featured binary version as shareware (Please send a request to Holger Zuleger hznet.de)
    2. A public domain version "gen6dnspd" with limited functionality (no PTR record generation) is available as Linux, FreeBSD or Solaris binary.

    DNSSEC

  • Zone Key Tool
    A DNSSEC zone key management tool kit
  • Create a trusted key section
  • dns-tsig-gen
    A small perl skript to generate a DNS TSIG key
  • DKIM

  • A small shell script to create a DKIM (RFC 4871) key (selector) and the corresponding DNS TXT Resource Record
  • Others

  • portrange is a command which prints a list of port ranges specified by a port mask and value combination as
    defined by the Draft "DHCP Options for Conveying Port Mask and Port Range Router IP Address" (M. Boucadair et.al.)

    Examples:
    $ portrange -l "b0100 0000 0000 0000"
    port range mask  16384 allow 2 users to use a range of 32768 ports
    port range value     0
    port range value 16384
    
    $ portrange -v 0x4000 -B -p "b0100 0000 0000 0000"
    list of port ranges for port range value 16384
     16384   16384 to 32767  0100 0000 0000 0000 - 0111 1111 1111 1111
     16384   49152 to 65535  1100 0000 0000 0000 - 1111 1111 1111 1111
    
    Please download the source code (portrange.c) or the Linux or Windows executable file.
  • trace4 is a wrapper command to start a tcpdump trace for a given amount of time or a given number of packets
    e.g.
    # trace4 15min --DNS
    # trace4 1h --ALLUDP
    # trace4 20pkt -i ste0 dest host _myip4_