0:00–0:10
Recap
0:10–1:50
Lab 4B
1:50–2:00
Debrief
0:00 – 0:10Recap · 10 min
Verify BIND9 is running with both views loaded
- Check:
sudo journalctl -u named -n 30 — confirm both internal and external zone load lines appear with no errors. Anyone whose BIND9 is still not starting — address now before the verification lab.
- Ask: "What does
recursion no on the external view actually prevent? Give a specific attack scenario it mitigates." — DNS amplification: an attacker sends DNS queries with a spoofed source IP to S1, which would resolve and reply to the victim's IP with a large response. With recursion no, external clients only get answers about yourname.net — S1 won't look up google.com on behalf of external clients. This eliminates S1 as an amplification target.
0:10 – 1:50Lab 4B · 100 min
Lab 4B — Verify split responses, test recursion, update zone content per view
Part 1 — Verify internal view response from S2 (20 min)
- From S2 (a 192.168.50.x source — matches the internal view):
dig @192.168.50.1 s1.yourname.net. Should return 192.168.50.1 (the internal IP). Also test: dig @192.168.50.1 yourname.net — should return the internal zone's SOA record.
- Test recursion from S2:
dig @192.168.50.1 google.com. S2 is in the internal view which has recursion yes. This should resolve successfully, forwarding to the classroom DNS.
- Record both the IP returned and the view name BIND9 used. To see which view handled the query, check the BIND9 query log if query logging is enabled, or use the authority section of the dig output — the SOA record will tell you which zone file was used.
Part 2 — Verify external view response from Windows host (20 min)
- On the Windows host, open Command Prompt or PowerShell. The Windows host is on the 172.17.x.x classroom network — its source IP does not match the internal-nets ACL, so it should be served by the external view.
- Query S1 using its external IP:
nslookup s1.yourname.net [S1-external-IP]
Should return S1's external IP (172.17.x.x) — the external zone file record.
- Test recursion from the Windows host:
nslookup google.com [S1-external-IP]. Should fail or return SERVFAIL/REFUSED — the external view has recursion no, so S1 won't resolve internet names for external clients.
- Record the results in the lab sheet comparison table.
Part 3 — Update zone content to reflect view differences (25 min)
- Enhance the internal zone file with additional records: add an A record for a new internal-only host. Increment the serial. Reload named:
sudo systemctl reload named. Verify the new record resolves from S2 but not from the Windows host (it's not in the external zone).
- This demonstrates the core use case: internal services (databases, management interfaces, monitoring servers) have DNS records that internal clients can resolve, but external clients have no knowledge of them.
- For the external zone: ensure www.yourname.net resolves to S1's external IP from the Windows host. This is what an internet user would see — the web server's public-facing address. Browse to http://S1-external-IP from the Windows host to confirm connectivity. (Nginx isn't installed yet — the default Nginx page is fine for now.)
Part 4 — Secondary DNS with views (35 min)
- S2 currently has secondary zone declarations from Week 3. With views now in use on S1, S2 needs to be updated — it must also use views, and its zone declarations must be inside view blocks that match S1's structure.
- On S2, edit
/etc/bind/named.conf.local. Restructure the secondary declarations inside a view block:
view "internal" {
match-clients { any; }; // S2 serves all clients from its internal data
zone "yourname.net" {
type secondary;
file "db.yourname.net.internal";
primaries { 192.168.50.1; };
};
};
Note: S2 only needs the internal view — it serves internal clients on LAN1. It doesn't need to replicate the external zone unless it also serves as an external nameserver. Keep it simple.
- Restart named on S2. Check the journal for zone transfer from S1. Verify S2 answers queries for yourname.net with the internal IP.
Lab 4B complete when: dig from S2 returns internal IP for s1.yourname.net. nslookup from Windows host returns external IP. Recursive query from Windows host returns REFUSED/SERVFAIL. Internal-only DNS record visible from S2, invisible from Windows host. S2 secondary transfer working with view structure.
1:50 – 2:00Debrief · 10 min
- The split response is confirmed working. Ask: "In a real enterprise, what types of hostnames would you put in the internal zone but not the external zone?" — database servers, internal APIs, management interfaces, monitoring systems, printers, backup servers. External clients have no business knowing these exist.
- Preview Wednesday: Nginx. The www.yourname.net DNS record in the external zone now points to S1. Wednesday we build the web server that makes that record resolve to something useful.
Learning outcomes — by end of Day 2, students can…
Verify split-horizon responsesUse dig and nslookup from both internal and external clients to confirm different IPs are returned based on source IP
Explain recursion no security benefitDescribe why disabling recursion on the external view prevents DNS amplification attacks
Maintain per-view zone contentAdd records to the appropriate zone file and verify they are visible only from the expected client perspective
Configure secondary DNS with viewsStructure secondary zone declarations inside view blocks on S2 to match the primary's view structure
Common issues and fixes
| Issue | Likely cause | Fix |
| Both S2 and Windows host get the same response | Both views' zone files have the same records, or the ACL doesn't cover S2's IP | Verify the internal zone file has 192.168.50.1 for s1 and the external has 172.17.x.x. Check that S2's IP is in the internal-nets ACL |
| Recursive query from Windows host succeeds (should fail) | recursion no not set in external view, or external view is inside a recursion yes block | Verify the external view block contains recursion no; at the view level, not just inside a zone |
| S2 zone transfer fails after view migration | S2's zone declaration is still outside a view block, which conflicts with the primary now using views | S2's named.conf.local must also use view blocks with its secondary declarations inside them |