NETW 0014 Week 3, Day 3 — BIND9 & the Forward Zone

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/25

encourage image

There's no tags or description

Looks like no tags are added yet.

26 Terms

1
New cards

When S2 resolves a hostname right now, which server answers it?

the classroom's, handed out by our own DHCP scope

2
New cards

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

3
New cards

What does resolvectl status do?

Shows the per-interface DNS servers

4
New cards

What does resolvectl query do?

tests a lookup through the whole stack

5
New cards

What does dig @server do?

tests one server directly

6
New cards

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)

7
New cards

What two types can zones be?

type primary (the current name; master is deprecated)

type secondary

8
New cards

How can reusable acl blocks be used?

Reusable acl blocks can be used to give sets of addresses reusable names.

9
New cards

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

10
New cards

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.

11
New cards

Why should you keep default_syslog in the default category?

so journalctl -u named still works for the rest of the week

12
New cards

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.

13
New cards

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).

14
New cards

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)

15
New cards

What would the SOA's primary name have become if it had been written without the trailing dot?

s1.yourname.net.yourname.net.

16
New cards

Why did your partner get an answer for your zone but REFUSED for an outside name?

allow-query includes them, allow-recursion does not.

17
New cards

What would happen if recursion were open to the classroom?

anyone in the room could use your server for abuse and amplification

18
New cards

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

19
New cards

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

20
New cards

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

21
New cards

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

22
New cards

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

23
New cards

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

24
New cards

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

25
New cards

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

26
New cards

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