1/17
Looks like no tags are added yet.
What does BIND do?
S1 has two faces: eth0 (LAN, 10.[desk].1.1) and eth1 (External, a classroom address). Internal clients should resolve www to the LAN address and reach it directly; the partner can only use the External address; the rest of the classroom should learn nothing. One zone file cannot do all three, so BIND matches the source of each query to a view, and each view has its own zone data, recursion and permissions.
What does a view have?
A view has a name, match-clients (and optionally match-destinations), its own recursion and allow-query, and its own copies of the zones it serves.
How does BIND check views?
BIND checks views top to bottom and uses the first whose match-clients matches the query's source address: the way an IOS ACL stops at the first match.
Describe the following view’s match-client, zones, and recursion: internal
match-client: lan and localhost
zones: forward zone with internal addresses, the LAN1 reverse zone, the default zones
recursion: yes (LAN only)
Describe the following view’s match-client, zones, and recursion: partner
match-client: partner (their S1 External address)
zones: forward zone with external addresses and fewer records
recursion: no
Describe the following view’s match-client, zones, and recursion: refuse
match-client: any
zones: none
recursion: no, and allow-query { none; }
Why is defining an ACL twice an error?
lan and partner already exist from Week 3. Recursion and query permissions are now set per view: a view's own setting overrides the global one, so an old global allow-recursion left in named.conf.options is not an error, but it is confusing, because it no longer controls anything. Remove it.
Why does every zone need to be in a view?
The message is "when using 'view' statements, all zones must be in views". That includes the zones you did not write: on Ubuntu, named.conf includes named.conf.default-zones (localhost, the loopback reverse zones and the root hints) outside any view. Move that include inside the internal view and remove it from named.conf; the other views get no zones they do not need.
What does named-checkconf -z do?
checks the configuration and loads every zone, which catches wrong file names early
What order should you put the views?
Rule: specific views first, the catch-all last, and test from every audience.
Put refuse (any) first and every client, internal ones included, is refused. The internal and partner ACLs do not overlap, so their order relative to each other changes nothing here; but if an address ever matched two views, the first one listed would win
What happens to the partner's query if the refuse view were first?
it matches any, so everyone is refused
Why does S2 not need views?
it queries S1 from 10.[desk].1.2, which matches the internal view, so it receives the internal zone.
What is the likely cause and fix for the following issue: "all zones must be in views"
A zone, or an include of the default zones, is still outside every view
Move the zone declarations and the default-zones include inside the internal view; check named.conf as well as named.conf.local
What is the likely cause and fix for the following issue: "attempt to redefine acl 'lan'"
An ACL was defined again in the new configuration
Reuse the Week 3 ACLs by name; define each once
What is the likely cause and fix for the following issue: named starts but a zone is missing
Wrong file path or name in one view
named-checkconf -z; read journalctl -u named; check names under /etc/bind
What is the likely cause and fix for the following issue: Everyone, including S2, is refused
The refuse view is first, or the lan ACL does not include S2
List views most specific first; check the ACL contents
What is the likely cause and fix for the following issue: S2 stops updating
S2's transfer request is not matching the internal view, or the serial in the internal file was not raised
Confirm S2's address is in lan; raise the internal file's serial
What is the likely cause and fix for the following issue: Both internal and partner files give the same answer
The partner file was copied and not edited
Check the A records in each file