no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


djbdns [2015/08/06 21:44] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== djbdns ======
 +
 +  * [[DNS]]
 +  * [[dnsip]] - simple lookup that returns IP address
 +  * [[dnsmx]] - print MX records of a domain
 +  * [[dnsname]] - lookup reverse ptr of an IP address
 +  * [[dnstxt]] - print ouf the TXT records of a domain
 +
 +  * [[http://cr.yp.to/djbdns/run-server.html|How to run a DNS server]]
 +  * [[http://cr.yp.to/djbdns/tinydns-data.html|The tinydns-data program]]
 +  * [[http://www.vegadns.org/|Vega DNS]]
 +
 +djbdns also ships with a number of user tools that make life easier.
 +
 +==== Setup ====
 +
 +Emerging djbdns on Gentoo will automatically setup the user accounts (dnscache, dnslog, tinydns) for you.
 +
 +First, create a tinydns service:
 +
 +<code>
 +mkdir /var/djbdns
 +tinydns-conf tinydns dnslog /var/djbdns/tinydns <nameserver IP>
 +</code>
 +
 +You can add a DNS local cache if you want, but it won't be used in this configuration.
 +
 +Create a symlink for the service, and start service scan:
 +
 +<code>
 +ln -s /var/djbdns/tinydns /service/tinydns
 +/etc/init.d/svscan start
 +</code>
 +
 +=== Initial DNS Setup ===
 +
 +The documentation says that you will need to use ''./add-ns'' to claim in-addr.arpa names and serve reverse DNS names, but that is only necessary if you are in charge of an entire IP block.
 +
 +  * [[http://cr.yp.to/djbdns/dot-arpa.html|How to receive a delegation from .in-addr.arpa]]
 +
 +==== Usage ====
 +
 +=== Adding A Domain ===
 +
 +== Nameserver records (NS) ==
 +
 +Add a domain's NS records (a.ns.domain.com, b.ns.domain.com)
 +
 +<code>
 +cd /service/tinydns/root
 +./add-ns domain.com 209.177.158.152
 +./add-ns domain.com 209.177.157.176
 +make
 +</code>
 +
 +== Host record (A) ==
 +
 +Add the domain's first A record, also called the "host record".
 +
 +Note that this is only run once per IP address, so run it for the FQDN.
 +
 +<code>
 +cd /service/tinydns/root
 +./add-host domain.com <IP address>
 +make
 +</code>
 +
 +=== DNS Scenarios ===
 +
 +== Domain Alias (A Record) ==
 +
 +<code>
 +cd /service/tinydns/root
 +./add-alias foo.domain.com <IP address>
 +make
 +</code>
 +
 +== Two Domains, One IP Address ==
 +
 +Decide which hostname is going to be the FQDN and add the host record and aliases as normal:
 +
 +<code>
 +cd /service/tinydns/root
 +./add-host domain.com <IP address>
 +./add-alias foo.domain.com <IP address>
 +make
 +</code>
 +
 +Any extra domain names will be an alias A record.  There can only be one host record per IP address.
 +
 +<code>
 +cd /service/tinydns/root
 +./add-alias domain.com <IP address>
 +./add-alias foo.domain.com <IP address>
 +make
 +</code>
 +
 +== Wildcard DNS (A Record) ==
 +
 +<code>
 +cd /service/tinydns/root
 +./add-alias *.domain.com <IP address>
 +make
 +</code>
 +
 +== CNAME Record ==
 +
 +You have to add it manually to the ''data'' file.  The syntax is:
 +
 +<code>
 +Csub.domain.com:server.com.:<TTL>
 +</code>
 +
 +Run ''make'' when finished.
  

Navigation
QR Code
QR Code djbdns (generated for current page)