Re: Is djbdns right for me?

Tony Primerano <[email protected]>
Newsgroups gmane.network.djbdns
Message-ID <[email protected]>
Matthew thanks for all the help.

Should I be using \052 instead of *?  This seems to work with the * but i
figured I would check.

Also, I changed data.do to pull in a list of IP addresses for my hosts
(webips file).   It now looks like

#!/bin/sh
exec <domains
exec >data.new
while read dom; do
  echo ".$dom::ns1.mynameserver.net"
  echo ".$dom::ns2.mynameserver.net"
  while read ips; do
    echo "+$dom:$ips"
  done < webips
  while read ips; do
    echo "+*.$dom:$ips"
  done < webips

done
exec >/dev/null
mv data.new data



On Tue, May 26, 2009 at 12:33 PM, Matthew Dempsky <[email protected]>wrote:

> On Tue, May 26, 2009 at 7:49 AM, Tony Primerano
> <[email protected]> wrote:
> > .foo.com::ns1.mydomain.com:259200
> > .foo.com::ns2.mydomain.com:259200
>
> You don't need the ":259200".  That's the default.
>
> > This format is frowned on but it seems the only way to allow me to have 1
> > set of nameservers for several domains.
>
> It's not frowned upon, it's just using the add-* scripts do some extra4
> sanity checking for you.
>
> > Then I add alias N * 2 times (do I need both lines or will *.foo.comlines
> > do the trick?)
>
> You need both; *.foo.com does not match foo.com.
>
> Additionally, you can generate your 'data' file from another file, so
> you don't need to do the same work manually every time.  E.g., create
> a file "domains" with one domain per line, put your existing
> mydomain.com tinydns entries into data.extra, and then write a script
> data.do:
>
>    #!/bin/sh
>    exec <domains
>    exec >data.new
>    cat data.extra
>    while read dom; do
>      echo ".$dom::ns1.mydomain.com"
>      echo ".$dom::ns2.mydomain.com"
>      echo "+$dom:1.1.1.1"
>      echo "+$dom:1.1.1.N"
>      echo "+*.$dom:1.1.1.1"
>      echo "+*.$dom:1.1.1.N"
>    done
>    exec >/dev/null
>    mv data.new data
>
> You can now add a Makefile entry for
>
>    data: data.do data.extra domains
>            ./data.do
>
> to regenerate the 'data' file whenever you update domains.
>
> Finally, you'll probably want to edit the add-* scripts to edit
> data.extra instead of data.
>
> > Is djbdns right for what I am trying to do?
>
> For what you described, yeah, tinydns is very flexible.  Its data file
> format is really well designed for building site-specific scripts like
> the one I described above.  (At work, we do something very similar,
> but ours is written in Python; I think EveryDNS and other sites use a
> MySQL database for maintaining things, and then generate the 'data'
> file using a PHP script.)
>
> > One more wrinkle..  I plan on running these servers in the cloud either
> on
> > slicehost or aws.  The IP addresses already have in-addr pointers
> assigned
> > (as far as I can tell)
> >
> > nslookup 67.23.34.123
> >
> > Non-authoritative answer:
> > 123.34.23.67.in-addr.arpa       name = 67-23-34-123.static.slicehost.net
> .
> >
> > is this an issue?
>
> No, it's fine.  Most VPS providers I've used will allow you to setup
> the reverse DNS lookup value through a web interface.
>
> > And one final cloud question..   I usually disable root login on my cloud
> > hosts,   for now I changed permissions on /service/tinydns/root/data.cdb
> so
> > I can rsync as a different user.   Does anyone else have suggestions on
> how
> > I might do this differently?
>
> That solution sounds fine to me.  (You'll want to change permissions
> on /service/tinydns/root as well, because rsync writes to a temporary
> file in the same directory first, and then atomically rename(2)s it
> over the existing file.)
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.