Files
linux-cloud-router/docs/dns.md
T

57 lines
2.7 KiB
Markdown

# DNS
The router's name server (PowerDNS), the primary of the router's domains. Every domain has the
same two name servers: the router's FQDN and a secondary name server. The [web sites](sites.md)
whose DNS is Router managed get their records in the domain they are in.
## Settings
- **State:** disabled, running, or not running yet; the router installs PowerDNS when it is
enabled.
- **Primary name server:** the router's FQDN, the SOA and the first NS of every domain. It is the
router's name and is not edited here; its own A record is kept by the DNS of its domain,
wherever that is, not by the router's domains.
- **Secondary name server:** the second NS of every domain, required while the name server is
enabled. The router notifies the addresses it resolves to of every change and allows them to
transfer the domains.
- **Public IP address:** the router's public IP, which the records of the sites with Public IP
take; empty when the router has none or no site uses it.
- **Listen:** the interfaces port 53 is open on. While IKEv2 or OpenVPN remote access is enabled,
it must not share an interface with the clients' resolver, by default on the internal one.
- **TTL:** how long resolvers keep the answers of a domain without its own TTL.
**Settings** edits them.
## Domains
**Add domain** takes the domain and an optional TTL; the edit button changes the TTL, and the
remove button removes a domain with its manual records. A domain inside another domain of the
router is delegated from it.
A domain the router hosts, for example `example.com`, with the router's FQDN `router.other.net`,
the secondary `ns2.provider.net`, and a Router managed site of `www.example.com` and
`example.com` with Public IP `203.0.113.10`:
```text
example.com. SOA router.other.net. hostmaster.example.com. <serial> 10800 3600 604800 300
example.com. NS router.other.net.
example.com. NS ns2.provider.net.
example.com. A 203.0.113.10
www.example.com. A 203.0.113.10
```
Selecting a domain shows:
- **Records served:** what the name server answers, including the SOA and NS records.
- **Manual records:** the records added with **Add record**: A, AAAA, CNAME, TXT, MX, SRV or CAA.
A name is relative to the domain, `@` for the domain itself. A record of a name and type the
domain already has from its name servers or its sites is not served.
Changes are served after the router applies them, a few seconds later; **Refresh** shows them.
## Delegation
The parent of each domain must delegate it: NS records naming the router's FQDN and the secondary
name server, and, for a name server inside the domain, its A record (a glue record), at the
registrar or DNS provider of the parent.