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:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | 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: | ||
| + | |||
| + | < | ||
| + | mkdir /var/djbdns | ||
| + | tinydns-conf tinydns dnslog / | ||
| + | </ | ||
| + | |||
| + | 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: | ||
| + | |||
| + | < | ||
| + | ln -s / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | === Initial DNS Setup === | ||
| + | |||
| + | The documentation says that you will need to use '' | ||
| + | |||
| + | * [[http:// | ||
| + | |||
| + | ==== Usage ==== | ||
| + | |||
| + | === Adding A Domain === | ||
| + | |||
| + | == Nameserver records (NS) == | ||
| + | |||
| + | Add a domain' | ||
| + | |||
| + | < | ||
| + | cd / | ||
| + | ./add-ns domain.com 209.177.158.152 | ||
| + | ./add-ns domain.com 209.177.157.176 | ||
| + | make | ||
| + | </ | ||
| + | |||
| + | == Host record (A) == | ||
| + | |||
| + | Add the domain' | ||
| + | |||
| + | Note that this is only run once per IP address, so run it for the FQDN. | ||
| + | |||
| + | < | ||
| + | cd / | ||
| + | ./add-host domain.com <IP address> | ||
| + | make | ||
| + | </ | ||
| + | |||
| + | === DNS Scenarios === | ||
| + | |||
| + | == Domain Alias (A Record) == | ||
| + | |||
| + | < | ||
| + | cd / | ||
| + | ./add-alias foo.domain.com <IP address> | ||
| + | make | ||
| + | </ | ||
| + | |||
| + | == Two Domains, One IP Address == | ||
| + | |||
| + | Decide which hostname is going to be the FQDN and add the host record and aliases as normal: | ||
| + | |||
| + | < | ||
| + | cd / | ||
| + | ./add-host domain.com <IP address> | ||
| + | ./add-alias foo.domain.com <IP address> | ||
| + | make | ||
| + | </ | ||
| + | |||
| + | Any extra domain names will be an alias A record. | ||
| + | |||
| + | < | ||
| + | cd / | ||
| + | ./add-alias domain.com <IP address> | ||
| + | ./add-alias foo.domain.com <IP address> | ||
| + | make | ||
| + | </ | ||
| + | |||
| + | == Wildcard DNS (A Record) == | ||
| + | |||
| + | < | ||
| + | cd / | ||
| + | ./add-alias *.domain.com <IP address> | ||
| + | make | ||
| + | </ | ||
| + | |||
| + | == CNAME Record == | ||
| + | |||
| + | You have to add it manually to the '' | ||
| + | |||
| + | < | ||
| + | Csub.domain.com: | ||
| + | </ | ||
| + | |||
| + | Run '' | ||