From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] a script to update DNS root hints
Date: Mon, 2 May 2016 04:09:15 -0700 [thread overview]
Message-ID: <96aad99b6e07cfd3b6c9f223ebabf27e@mule> (raw)
[-- Attachment #1: Type: text/plain, Size: 221 bytes --]
interesting! i took a different approach to this issue quite a while
ago, using dns/debug. this approach should work assuming that it is
run often enough to prevent dropping of old ip addresses between runs.
- erik
[-- Attachment #2: genrootservers --]
[-- Type: text/plain, Size: 802 bytes --]
#!/bin/rc
rfork en
aserver=a.root-servers.net
letters=(a b c d e f g h i j k l m)
fn fatal {
echo $*>[1=2]
exit fatal
}
fn get{
ndb/dnsdebug @$aserver $* | awk '
$1=="answer" && $(NF-2) == "negative" {next}
$1=="answer" {printf "dom=%s %s=%s\n", $2, $(NF-1), $NF}
'
}
aserver = `{get a.root-servers.net|sed 's/.*=//g'}
if(~ $#aserver 0)
fatal cant find a.root-servers.net
{
echo '#'
echo '# entries defining the dns root. these will be overridden by any'
echo '# authentic info obtained from the root.'
echo '#'
echo 'dom='
for(letter in $letters)
echo ' ns='^$letter^'.root-servers.net'
for(letter in $letters)
get $letter^.root-servers.net ip
{
for(letter in $letters){
get $letter^.root-servers.net ipv6
}
} | sed 's/^/# /g'
}
next reply other threads:[~2016-05-02 11:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-02 11:09 erik quanstrom [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-05-01 22:48 Skip Tavakkolian
2016-05-02 0:00 ` cinap_lenrek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=96aad99b6e07cfd3b6c9f223ebabf27e@mule \
--to=quanstro@quanstro.net \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).