AS Sites Hosts Subnets Utilities Last changes Help Login
Utility functions:  Data export Consistency check Maintainers
Hamnet-DB 4.6 Content is covered by CC BY-NC-SA license

Database dump and software download

Download:   MySQL dump of Hamnet-DB tables (including history)

Hint: Use the following command to maintain a mirror (assumes existing user and database hamnet):
      wget -qO- http://hamnet-idf.fr/hamnetdb/dump.cgi | \
        mysql -u hamnet --password=<yourpw> hamnet
For the first setup you need the full structure of all tables .

CSV-export of Hamnet-DB tables

Download:   as.csv   site.csv   host.csv   subnet.csv   edge.csv  

Generate DNS zone files

   Limit to AS (only_as)   

SOA-NS (ns)      SOA-Mail (mail)   

SOA-Serial (serial)    (Inserted literally, 'unix' > seconds since epoch, default yymmddHHMM)

Domain-suffix for all entries (suffix)      Country (country)         


Automated update (Debian file system layout):
      cd /var/cache/bind && \
        wget -qO- 'http://hamnet-idf.fr/hamnetdb/dnszone.cgi?by_as=0&suffix=de.ampr.org' | \
        tar zxvf - && /etc/init.d/bind9 reload
First setup: Add   include "named.conf.hamnetdb";   to /etc/bind/named.conf.local

Generate /etc/hosts for local name resolution or usage with dnsmasq

Download:   /etc/hosts

This file can be combined with normal DNS name resolution. It offers a simple possibility to get here documented addresses resolved to names.

Hint: You can use this file as source for the dnsmasq name server program. In this combination it is possible to mix up the zone contents of official ampr.org with the entries of this database. This is also true for the reverse lookup. When offline, known names are still resolved as <name>.ampr.org.

Set this in /etc/dnsmasq.conf:

      addn-hosts=/tmp/hosts.hamnetdb
      server=8.8.8.8                        # or your parent name server 
Shell commands for auto update:
      wget -qO /tmp/hosts.hamnetdb http://hamnetdb.net/hosts.cgi && \
        /etc/init.d/dnsmasq restart