1/25
Looks like no tags are added yet.
When S2 resolves a hostname right now, which server answers it?
the classroom's, handed out by our own DHCP scope
Is BIND9 authoritative or recursive?
trick question- BIND9 can be authoritative (answers for zones it owns), recursive (looks names up on behalf of clients, caching the results, here by forwarding to the classroom resolver and 1.1.1.1), or both
What does resolvectl status do?
Shows the per-interface DNS servers
What does resolvectl query do?
tests a lookup through the whole stack
What does dig @server do?
tests one server directly
What three files does /etc/bind/named.conf include?
named.conf.options (daemon settings: forwarders, recursion, who may ask)
named.conf.local (our zones)
named.conf.default-zones (localhost and root hints)
What two types can zones be?
type primary (the current name; master is deprecated)
type secondary
How can reusable acl blocks be used?
Reusable acl blocks can be used to give sets of addresses reusable names.
What four things do you need to validate before every restart?
named-checkconf (configuration)
named-checkzone <zone> <file> (a zone file)
rndc reload or a restart
Read journalctl -u named for zone ... loaded serial N
By default named writes everything to syslog, so it ends up in the journal. The logging statement lets you choose where messages go - How do you choose where and which messages?
A channel says where: a file, a severity, and what to print on each line (time, severity, category).
A category says which messages use it: default is everything without its own category (start-up, zone loading, and the "denied" lines for refused queries); queries is one line per query, written only once query logging is switched on.
Why should you keep default_syslog in the default category?
so journalctl -u named still works for the rest of the week
named runs as the bind user and is confined by AppArmor - What does its profile let it do?
Its profile lets it write under /var/log/named/ and nowhere else in /var/log, so the log files live in that directory, which you create and give to bind. A log file outside it will not work.
What is the trailing dot rule?
a name ending in a dot is absolute; a name without one has the zone name appended, so s1.yourname.net without the dot becomes s1.yourname.net.yourname.net.. A CNAME may not coexist with other records at the same name. named-checkzone catches a missing trailing dot on an NS target (it reports "has no address records" and the zone is not loaded), but not on a CNAME target, the SOA primary name or a PTR target: those load silently, so confirm with dig. dig shows the answer's flags (aa authoritative answer, rd/ra recursion) and status (NOERROR, NXDOMAIN, REFUSED, SERVFAIL).
What three permissions are separated by BIND?
allow-query (who may ask anything of this server), allow-recursion (who may use it as a resolver) and a per-zone allow-query (who may ask about that zone)
What would the SOA's primary name have become if it had been written without the trailing dot?
s1.yourname.net.yourname.net.
Why did your partner get an answer for your zone but REFUSED for an outside name?
allow-query includes them, allow-recursion does not.
What would happen if recursion were open to the classroom?
anyone in the room could use your server for abuse and amplification
What is the likely cause and fix for the following issue: named fails to start or the zone does not load
Syntax error in named.conf.*, or a bad zone file
sudo named-checkconf and named-checkzone name the line; read journalctl -u named
What is the likely cause and fix for the following issue: named will not start after adding the logging block
the log directory is missing or not owned by bind, or a log file is outside /var/log/named (AppArmor)
sudo mkdir /var/log/named and sudo chown bind:bind /var/log/named; keep every log file in it; sudo named-checkconf; read journalctl -u named and sudo journalctl -k | grep -i apparmor
What is the likely cause and fix for the following issue: bind-queries.log stays empty
Query logging is not switched on
Add querylog yes; to options and restart, or run sudo rndc querylog on
What is the likely cause and fix for the following issue: Zone fails: "not at top of zone" or names double up
A name containing dots is missing its trailing dot
Make every absolute name end in a dot; leave short labels (s1) without one. named-checkzone reports a bad NS target but not a bad CNAME target: check with dig
What is the likely cause and fix for the following issue: dig returns SERVFAIL
The zone file did not load
Check the journal for the load error, fix, reload
What is the likely cause and fix for the following issue: dig from S1 itself returns REFUSED
allow-query does not include localhost or the LAN
Add localhost and the lan ACL to the query ACLs
What is the likely cause and fix for the following issue: The partner is refused for your zone
Their address in your ACL is wrong (a LAN or S2 address instead of their S1 External address)
Use the address the query actually arrives from: their S1's eth1 address; check it in the query log or with a capture
What is the likely cause and fix for the following issue: A third student gets answers
The ACLs are too broad (any, or the classroom subnet)
Allow only lan, partner and localhost; reload and re-test
What is the likely cause and fix for the following issue: S2 still resolves through the classroom server
The DHCP scope still hands out the old DNS, or S2 has not renewed
Check option domain-name-servers in dhcpd.conf, restart dhcpd, renew S2, read resolvectl status