Skip to navigation

dnsrev

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 = [("db.example.net", "example.net"),
             ...]
REV_ZONES = [("db.example.net.rev4", "192.0.32.0/24"),
             ("db.example.net.rev6", "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.

Wilmer.Gaa.st

 /
  Non-geek stuff
   About me
    Weblog
   Music
    Concerts
   Films and TV
  Projects
   BitlBee
   Giggity
   dnsrev
   uhat
   Unmaintained stuff
    Winterm hacking
    Netgear DG834G
    boiscrape
    Axel
    SMArT
    ttt.cgi
    SF16-FMR driver
© 2011 Wilmer van der Gaast