Internal DNS. BIND not reachable from the internal network
TL;DR
The scoring engine's internal probe (DNS INT FWD for A records, DNS INT REV for PTR) can't reach your BIND from inside the team subnet.
Commands in order
-
1. 1. BIND service status #
sudo systemctl status bind9 2>/dev/null || sudo systemctl status namedExpect: active (running)If not: Inactive:systemctl start bind9. Won't start:named-checkconfshows syntax errors, orjournalctl -u bind9 -n 50for permission/zone-load problems. -
2. 2. Config + zone syntax validation #
named-checkconf && for z in /etc/bind/db.*; do echo "== $z =="; named-checkzone $(basename $z) $z; doneExpect: No named-checkconf output +OKfor each zoneIf not: Any error message names the file/line. Common: missing trailing dot on FQDN, wrong$ORIGIN, un-bumped SOA serial after an edit. -
3. 3. Listening on both UDP AND TCP 53? #
ss -ulnp | grep :53 ; echo '---'; ss -tlnp | grep :53Expect: UDP and TCP on the internal IP (not just 127.0.0.1)If not: Missing one: setlisten-on { any; };in named.conf.options andlisten-on-v6 { any; };, reload. -
4. 4. Test forward zone from localhost #
dig @127.0.0.1 team<N>.ncaecybergames.org A +shortExpect: The A record's IPIf not: Empty / SERVFAIL = zone not loaded, or the name isn't in the zone. See DNS EXT FWD playbook for adding the record. -
5. 5. Test reverse zone from localhost (separate structure, often forgotten) #
dig @127.0.0.1 -x <one-of-your-internal-IPs> +shortExpect: A PTR record with trailing dotIf not: Empty = reverse zone not configured. See DNS EXT REV playbook step 4 for a minimal in-addr.arpa zone. -
6. 6. Test from a DIFFERENT internal host (mirror the scorer) #
# from any other internal machine: dig @<dns-vm-ip> team<N>.ncaecybergames.org +shortExpect: The A record's IPIf not: Fails from elsewhere but works on the DNS VM = listen-on too narrow OR host firewall dropping inbound 53. Check ufw/iptables. -
7. 7. Host firewall not blocking 53 inbound? #
sudo iptables -L INPUT -nv | grep -E ':53|dpt:53'; sudo ufw status 2>/dev/nullExpect: No DROP/REJECT on tcp/udp 53If not: Drop rule:iptables -D INPUT <num>orufw allow 53. Make sure BOTH udp and tcp are allowed. -
8. 8. AppArmor denials (silent cause of zone-not-loading) #
grep -i 'apparmor' /var/log/syslog | grep -i named | tail; sudo aa-status 2>/dev/null | grep namedExpect: No denials; or named in complain modeIf not: DENIED lines for/etc/bind/db.<something>= AppArmor blocking. Either move zone files into/etc/bind/or edit/etc/apparmor.d/local/usr.sbin.namedto grant read. -
9. 9.
recursion norecommended for authoritative servers #grep -E 'recursion|allow-recursion' /etc/bind/named.conf.optionsExpect:recursion no;andallow-recursion { none; };If not: Open resolvers get DDoS-amplified. You only need to answer queries for YOUR zones; recursion=no and allow-recursion={none} locks it down.
Decision tree
dig @127.0.0.1 <team-hostname> work locally?listen-on is scoped too narrowly OR host firewall is dropping 53. Check both.
named-checkzone on each file; fix syntax and bump SOA serial.
named-checkconf + journalctl will tell you why (usually zone syntax or AppArmor).
Context
The scoring engine's internal probe (DNS INT FWD for A records, DNS INT REV for PTR) can't reach your BIND from inside the team subnet. Unlike DNS EXT (which is almost always a router dst-nat problem), DNS INT is usually a BIND-side problem: the service is down, listening only on 127.0.0.1, or the zone files have a syntax error. If the internal probe works but EXT doesn't, you've confirmed the router is the issue. if BOTH are failing, start here — internal first, because the internal probe doesn't traverse any NAT. DNS INT FWD: 6,405 pts at regional. DNS INT REV: 6,394 pts.
- BIND not running on the DNS VM.
- BIND listening only on 127.0.0.1 (
listen-on { 127.0.0.1; };instead ofanyor the internal IP). - Internal DNS VM's IP drifted (DHCP renewal), scoring probe still hits the old IP.
- Zone files missing / invalid (BIND refuses to serve the zone;
named-checkzonefails). - Host firewall on the DNS VM dropping 53 inbound.
- AppArmor denying BIND to read zone files placed outside
/etc/bind/or/var/cache/bind/. - BIND bound to 0.0.0.0:53 but the internal interface is down (
ip link show). - TCP fallback gotcha: host firewall allows UDP 53 but not TCP 53. Responses over 512 bytes (DNSSEC, multiple records) fail the TCP retry.
External references (9)
- NCAE Cyber Games. official rules and scoring
-
NCAE Cyber Games. official tutorials channel
44 tutorials. Numbers 23–32 are the Defense Checklist.
- ISC BIND 9 administrator reference manual
- ISC BIND 9 configuration reference (listen-on, allow-query, recursion)
- RFC 1035. Domain Names (protocol spec)
- RFC 7766. DNS over TCP (why TCP fallback matters)
- Red Hat RHEL 9. Setting up BIND (full named.conf with forward+reverse)
- Zytrax. reverse zone classless /24 naming convention
- APNIC. open resolvers and DNS amplification
Other patterns on this service
Related errors (other services, same root cause)
Errors sharing this playbook title or the same key failure signature. Fixing one often fixes all.