[dns-operations] calculating DNSSEC keytags in awk

Tony Finch dot at dotat.at
Thu Apr 16 10:04:52 UTC 2015

Frank <linux at dreamofjapan.de> wrote:
> have you found a solution to your problem "calculating DNSSEC keytags in
> awk" from Sat Dec 17 12:39:04 UTC 2011?

dig +multiline will show you the key tag, or you can use dnssec-dsfromkey
and pull the tag out of the result, e.g.

$ dig dnskey $zone | dnssec-dsfromkey -f - $zone | awk 'NR == 1 { print $4 }'

f.anthony.n.finch  <dot at dotat.at>  http://dotat.at/
Humber, Thames: Variable 3 or 4, becoming northeast 4 or 5 in Thames. Smooth
or slight, occasionally moderate later in Thames. Occasional rain at first.
Good, occasionally poor.

More information about the dns-operations mailing list