User Tools

Site Tools



Note that this is not a DNS tutorial nor intended to be so.

It's mostly intended to attempt to reasonably cover documentation of some DNS infrastructure and maintenance thereof, and be reasonably accurate at least as of the time of this writing/updating (2020-05-19).

The BALUG host ( is not only DNS server for multiple [L]UG (and related) domains, but also DNS nameserver master for many such domains. At the present time, it includes these domains:

At the present time, there are various person(s) that have access to edit the DNS data for one or more of those zones/domains … and/or sub-domains thereof. E.g. in additional to Michael Paoli having requisite (superuser / "root" / UID 0) access (and thus also being able to perform these tasks), the following folks have access to edit the zone(s)/domain(s)/data noted:

SF-LUG domains:
can be edited by:
Jim Stockford
Grant Bowman
Rick Moen
Al Whaley

Note also that there are person(s) who are or may become set up also to edit DNS data for the sub-domain (and any subdomains thereof).


Note that all the domains/zones thus far mentioned on this wiki page, are set up with dynamic DNS enabled.
So, one can't merely edit and reload the zone file for changes to take effect.
If one is to do it the "old fashioned way", by editing of zone file, minimally (as system is currently using BIND9), one must first use
rndc freeze zone
and then after edits to the zone file are completed, use
rndc thaw zone
If one wants/needs to do it the "old fashioned way" (editing zone file(s)), to do additional checks and reduce errors, it is highly recommended to use the program:
(either link/name is same program)
The program takes argument(s) of the zone file(s) to be edited.
It handles the freeze/thaw, and uses sudo and sudoedit (presuming invoker has the requisite privileges) to accomplish the appropriate tasks.

One can also "of course", invoke:
sudo -l
to get a listing of what sudo access one has.

It may also be highly preferable (if not strongly recommended), that rather than edit the zone file, one uses dynamic update to make the DNS changes.

Below I give fair bit of example, and more general documentation/explanation (and with some correction(s)/clarification(s)):

Date: Wed, 11 Mar 2020 01:18:26 -0700
From: "Michael Paoli" <>
Subject: (hostname &): Re: SF-LUG DNS editors: SF-LUG zones now using dynamic DNS

Oh, might help if I remind folks of the hostname:
That's the canonical hostname for the host that's the master.
Expect that that can always get you to the host via DNS.

From: "Michael Paoli" <>
Subject: SF-LUG DNS editors: SF-LUG zones now using dynamic DNS
Date: Wed, 11 Mar 2020 00:37:46 -0700

Dear SF-LUG DNS editors,

(You are among those having access to change SF-LUG's master DNS data.)
Please note that SF-LUG's DNS zones
are now using/allowing dynamic DNS update to the zones,
so the procedures for editing DNS necessarily changes a bit.

Permissions/access via sudo(1) have also been adjusted accordingly.

One may make DNS changes, either by:
o dynamic DNS update, or
o editing zone file - with some additional pre/post steps

Using dynamic update.  The sudo access allows one to execute nsupdate as
group bind, and with that group bind access, access the requisite key
that can be used to edit those zones.

Editing zone file.  To be reasonably assured that will work properly,
(via sudo) use rndc freeze (on the specific zone) before editing the
zone file, and after successfully editing the zone file, likewise
use rndc thaw (on the specific zone, and again via sudo).
To make things easier, I also coded up:
(both those are same program and file)
Those programs take argument(s) of the requisite zone(s),
and handle the requisite pre/post steps, in addition to doing
relevant checks.  (They're world readable, so one may certainly review
Also note, that comments generally are no longer preserved, as dynamic
DNS is in use - effectively comments will end up stripped, the data
reformatted, and BIND9 will add its standard commenting on (some select
bits of) the data.

Let's give some examples:

Using dynamic DNS update:
$ sudo -g bind /usr/bin/nsupdate -l -k /var/cache/bind/keys/ddns-key.SF-LUG
[sudo] password for test:
>update add 300 IN A
>update add 300 IN A
(entered a ^D after send and <ENTER>)
$ dig @ +norecurse +noall +answer A     300     IN      A     300     IN      A

Using sudoeditzone to edit zone file (here we use ed rather that vi,
to make it easier to see exactly what we do).
Also, the zone serial numbers use (at least start with) seconds since
the epoch - Unix time - so (GNU's) date +%s is very handy for that
(and one added \ before % to prevent ed/vi/ex/vim/... from doing
interpretation/substitution on the %):
$ SUDO_EDITOR=ed sudoeditzone
fjh21kni                A
fjh21kni                A

                                1583906526 ; serial
!date +\%s
                                1583909117 ; serial
A zone reload and thaw was started.
Check the logs to see the result.
$ dig @ +norecurse +noall +answer A     300     IN      A     300     IN      A

And lastly, we again use dynamic update to delete our temporary demo
$ sudo -g bind /usr/bin/nsupdate -l -k /var/cache/bind/keys/ddns-key.SF-LUG
>update delete IN A
>update delete IN A
(again we did a ^D following our send and <ENTER/RETURN>)
$ dig @ +norecurse +noall +answer A

Also, one may note, ~root/bin/Named-checkconf
It's essentially an "enhanced" version of (wrapper around) named-checkconf
and runs relevant checks, and with relevant options/arguments.  Note also
to be effective it needs to run as root (to be able to chroot and read
relevant data, etc.).  It's also world readable, so one may view/inspect
it to learn more.

Want to learn more about dynamic DNS?
In addition to relevant documentation, etc.,
later this month, and BALUG:

Use of:
$ sudo -l
may also be useful to review the commands one has access to with
privilege.  I also give an example listing of that towards the end here
(temporarily giving the "test" account that same sudo access for
demonstration purposes).

$ sudo -l | sed -ne '/may run/,$p'
User test may run the following commands on balug-sf-lug-v2:
    (root) /bin/su - root -c bin/Named-checkconf, /usr/sbin/rndc sync, /usr/sbin/rndc sync -clean, /usr/sbin/rndc freeze, sudoedit /etc/bind/master/, /usr/sbin/rndc reload, /usr/sbin/rndc thaw, /usr/sbin/rndc zonestatus, /usr/sbin/rndc notify, /usr/sbin/rndc sync, /usr/sbin/rndc sync -clean, /usr/sbin/rndc freeze, sudoedit /etc/bind/master/, /usr/sbin/rndc reload, /usr/sbin/rndc thaw, /usr/sbin/rndc zonestatus, /usr/sbin/rndc notify, /usr/sbin/rndc sync, /usr/sbin/rndc sync -clean, /usr/sbin/rndc freeze, sudoedit /etc/bind/master/, /usr/sbin/rndc reload, /usr/sbin/rndc thaw, /usr/sbin/rndc zonestatus, /usr/sbin/rndc notify, /usr/sbin/rndc sync, /usr/sbin/rndc sync -clean, /usr/sbin/rndc freeze, sudoedit /etc/bind/master/, /usr/sbin/rndc reload, /usr/sbin/rndc thaw, /usr/sbin/rndc zonestatus, /usr/sbin/rndc notify, /usr/sbin/rndc sync, /usr/sbin/rndc sync -clean, /usr/sbin/rndc freeze, sudoedit /etc/bind/master/, /usr/sbin/rndc reload, /usr/sbin/rndc thaw, /usr/sbin/rndc zonestatus, /usr/sbin/rndc notify, /usr/sbin/rndc sync, /usr/sbin/rndc sync -clean, /usr/sbin/rndc freeze, sudoedit /etc/bind/master/, /usr/sbin/rndc reload, /usr/sbin/rndc thaw, /usr/sbin/rndc zonestatus, /usr/sbin/rndc notify
    (test : bind) /usr/bin/nsupdate -l -k /var/cache/bind/keys/ddns-key.SF-LUG

See also: SF-LUG Resources, etc. Digital Resources

system/dns.txt · Last modified: 2020-09-07T19:29:25+0000 by michael_paoli