Skip to navigation


Simple script to generate DNS reverse lookup zones. Help info:

dnsrev - Autogen/refresh reverse DNS zonefiles.

Set your forward and reverse zones. All zonefiles have to exist already,
this script does not (yet) create reverse zonefiles from scratch, it only
updates them.

  -c [file]   Configuration file location (default: ./dnsrev.conf).
  -h          This help info.
  -n          Dry run.
  -d          Show diffs of changes.
  -s          Do not update SOA serial number.

The configuration file should define two lists of tuples like this:

FWD_ZONES = [("", ""),
REV_ZONES = [("", ""),
             ("", "2620:0:2d0:200::/64"),

The first column is the name of the zonefile. The second column is the
domain name in FWD_ZONES, and the ASCII-formatted subnet (including   
netmask) in REV_ZONES.

You can list as many forward and reverse zones as you want. There doesn't
have to be any kind of 1:1 relationship between any of them.

Suggestions welcome, use at your own risk, etc.

Download source code here or just view it here.

  Non-geek stuff
   About me
   Films and TV
   Unmaintained stuff
    Winterm hacking
    Netgear DG834G
© 2011 Wilmer van der Gaast