Dnstool
Dnstool is a set of curses-based user interfaces and supporting scripts for easy administration of a large dns zone with dozens of reverse zones.
Install / Use
/learn @Redpill-Linpro/DnstoolREADME
DNSTOOL README
PURPOSE
Dnstool is a set of curses-based user interfaces and supporting scripts for easy administration of some dns zones with dozens of reverse zones.
LICENSE
Dnstool is distributed under the terms of the GNU General Public License (GPL) version 3 or later (at your option), which can be found in the file named COPYING.
INSTALLING
Prerequisites:
Debian/Ubuntu "DNS Server" base install
apt-get install libnetaddr-ip-perl libnet-dns-perl libcurses-perl libcurses-ui-perl
Assumes a Debian-style BIND version 9 install; should be adaptable to other layouts, previous incarnations have been known to run fine on RHEL.
Configuration is saved in DNS, in the "policy.dnstool" and "networks.dnstool" local zones.
For an example setup using RFC 5737 networks, do a "make install", then add include "/etc/bind/named.conf.dnstool"; include "/etc/bind/named.conf.example"; to /etc/bind/named.conf and do your usual "rndc reconfig" incantation.
The toolmaster configured in "policy.dnstool" needs to be correct in the local DNS, or nothing will work. An otherwise-working /etc/hosts override is not enough. The example zone has the toolmaster at 192.0.2.5.
/etc/bind/dnstool/empty-zone is the template for new reverse zones, edit to suit.
Config layout: (/var files are updated by scripts or named, /etc is left to the sysadmin)
├── etc │ └── bind │ ├── dnstool │ │ ├── empty-zone │ │ └── policy │ ├── named.conf.dnstool │ └── named.conf.example └── var └── lib └── bind ├── dnstool │ ├── example.example │ ├── extra-example.example │ └── networks └── dnstool-rev ├── 192.0.2 ├── 198.51.100 ├── 203.0.113 └── zones.conf
RUNNING
The individual tools should be pretty self-explanatory. Meant to be run on a DNS master, as the BIND user.
dnstool edits forward and reverse zones. dnstool-admin edits the list of administered reverse zones.
In case of trouble, the tools log to $HOME/dnstool.log respective $HOME/dnstool-admin.log.
dnstool-zonesync is a helper script that creates the actual reverse zones and reloads bind config.
extras/ has various other scripts useful for automation and documentation.
SCREENSHOTS
Well, why not?
┌ DNS tool: Choose an operation ─────────────────┐
│ │
│ │
│ Add or remove DNS record? │
│ │
│ │
│ < Add > < Delete > < Exit > │
│ │
│ │
│ DNS-tool server: dnstooltest.example.exam$ │
│ │
│ │
└────────────────────────────────────────────────┘
┌ DNS tool: ──────────────────────────────────────────────────────────────────┐ │ │ │ Choose domain to edit │ │ │ │ ┌ Domain ──────────────────────────────────────────────────────────────────┐ │ │ │example.example. │ │ │ │extra-example.example. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └──────────────────────────────────────────────────────────────────────────┘ │ │ │ │ Filter: << Previous Next >> < Cancel > │ │ │ └──────────────────────────────────────────────────────────────────────────────┘
┌ DNS tool: Add an address ────────────────────────────────────────────────────┐ │ │ │ Choose a network │ │ │ │ ┌ Prefix Description ────────────────────────────────────────┐ │ │ │Add address based alias (an A record) │ │ │ │Add name based alias (a CNAME record) │ │ │ │ 192.0.2.0/24 TEST-NET-1 │ │ │ │ 198.51.100.0/24 TEST-NET-2 │ │ │ │ 203.0.113.0/24 TEST-NET-3 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └──────────────────────────────────────────────────────────────────────────┘ │ │ │ │ Filter: << Previous Next >> < Cancel > │ │ │ └──────────────────────────────────────────────────────────────────────────────┘
┌ DNS tool: Add ───────────────────────────────────────────────────────────────┐ │ │ │ Choose an IP-address from 192.0.2.0/24 TEST-NET-1 │ │ │ │ ┌ Address Description ─────────────────────────────────────────────┐ │ │ │ 192.0.2.1 not used │ │ │ 192.0.2.2 not used │ │ │ │ 192.0.2.3 not used │ │ │ │ 192.0.2.4 not used │ │ │ │ 192.0.2.7 not used │ │ │ │ 192.0.2.8 not used │ │ │ │ 192.0.2.9 not used │ │ │ │ 192.0.2.10 not used │ │ │ │ 192.0.2.11 not used │ │ │ │ 192.0.2.12 not used │ │ │ │ 192.0.2.13 not used │ │ │ │ 192.0.2.14 not used │ │ │ │ 192.0.2.15 not used │ │ │ │ 192.0.2.16 not used │ │ │ │ 192.0.2.17 not used │ │ │ └──────────────────────────────────────────────────────────────────────────┘ │ │ │ │ Filter: not used << Previous Next >> < Cancel > │ │ │ └──────────────────────────────────────────────────────────────────────────────┘
┌ DNS tool: Input name ────────────────────────────────────┐
│ │
│ Please fill in hostname and TTL │
│ │
│ .example.example. 300 IN A 192.0.2.11 │
│ │
│ << Previous Finish >> < Cancel > │
│ │
│ [X] Create A record │
│ │
│ [X] Create PTR record │
│
Related Skills
openhue
349.9kControl Philips Hue lights and scenes via the OpenHue CLI.
sag
349.9kElevenLabs text-to-speech with mac-style say UX.
weather
349.9kGet current weather and forecasts via wttr.in or Open-Meteo
casdoor
13.3kAn open-source AI-first Identity and Access Management (IAM) /AI MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD
