Native Alpine deployment for the anycast DNS estate -- no Docker, no Caddy, alongside squid and openbao as an exception to the repo norm. Knot binds :53 directly, needs real client addresses for RRL and DNS cookies, and its DNSSEC key store must live on the host filesystem. Deploys a NODE. Zone data lives in the separate dns repo and arrives from its pipeline. The split is /etc/knot/knot.conf: written here once as a skeleton of include: lines covering only what belongs to a box (identity, NSID, storage paths, listen, logging, control socket); everything that is DNS policy -- templates, dnssec policy, remotes/ACLs, modules, the domain inventory and the zone files -- is delivered by the dns repo. knsctl replaces adddns.pl and adddnssec.pl, fixing four defects: - the duplicate check searched for the domain in BIND named.conf double-quote syntax (/"$domain"/) against unquoted YAML, so it could never match; only the -f zone-file test ever caught anything - neither script consulted the other class's manifest, so a domain already in public.conf could be appended to dnssec.conf and fail the reload AFTER both files had been written - nothing validated before reloading - the reload was non-blocking, so a rejected config reported success Its manifest matching is anchored on the YAML key and escapes the dot, so barsrvno.de and srvnoXde no longer false-positive against srvno.de. Aliases preserve the existing muscle memory with three corrections: -b on every triggering knotc command (without it knotc returns OK when the command was SENT, not when it succeeded); knzr (zone-reload) added alongside knrl (reload), since reloading one zone's data is the right verb for a record change and a full reload is only needed when a zone is added or removed; and serial/NSID helpers that query unicast addresses, because asking the anycast service address reaches whichever node is nearest and says nothing about which node is stale. Break-glass writes (add/remove/edit) warn and audit-log: they are overwritten by the next pipeline deploy unless the change also lands in git. Removal refuses to purge DNSSEC keys -- zone-purge +keys is irreversible on Knot 3.5.x, the key trash bin having arrived in 3.6.0 -- and prints the ordering requirement, since removing a signed zone before the parent DS is withdrawn is an outage for validating resolvers rather than a graceful shutdown. deploy.sh, build.sh and cloud-init.yml are deliberately not included yet; they are blocked on the Knot version decision, which sets the apk pin and feature availability. See the Status section in the README. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
49 lines
2.8 KiB
Plaintext
49 lines
2.8 KiB
Plaintext
|
|
┌────────────────────────────────────────────────────────────────────────┐
|
|
│ !! DANGER - CRITICAL INFRASTRUCTURE !! │
|
|
│ │
|
|
│ YOU are connected to a CRITICAL SYSTEM │
|
|
│ CHECK YOUR WORK BEFORE RELOAD / RESTART OF THE SERVICE │
|
|
├────────────────────────────────────────────────────────────────────────┤
|
|
│ Data Center: @DATACENTER@ │
|
|
│ Hostname: @FQDN@ │
|
|
│ Node ID: @NODE_ID@ │
|
|
│ Role: @ROLE@ │
|
|
└────────────────────────────────────────────────────────────────────────┘
|
|
|
|
Zones are managed in GIT. Changes belong in a signed PR to the dns repo.
|
|
Anything you edit here is overwritten by the next deploy unless you also
|
|
land it in git. Use knsctl for anything that writes -- it audit-logs.
|
|
|
|
Will's Cheat Sheet \(^-^)/
|
|
|
|
Reload / check
|
|
knrl Reload config (use when a zone was ADDED or REMOVED)
|
|
knzr domain.tld Reload ONE zone's data (prefer this for record changes)
|
|
knsc Check server config is valid
|
|
knzc domain.tld Check a zone via the running server (no output = OK)
|
|
knst Zone status for everything
|
|
|
|
Navigate / edit
|
|
knpbz Go to public zones /var/lib/knot/zones/public
|
|
knsec Go to DNSSEC zones /var/lib/knot/zones/dnssec
|
|
knarpa Go to ARPA zones /var/lib/knot/zones/arpa
|
|
ozf domain.tld Open zone file here in $EDITOR
|
|
ozfa domain.tld Find + open it anywhere (warns: break-glass)
|
|
|
|
Inspect
|
|
knser domain.tld This node's serial for a zone
|
|
knsers Serial comparison across PEERS
|
|
knsid domain.tld Which node answered (EDNS NSID)
|
|
knstale Look for silently-ignored zone files
|
|
|
|
Domains
|
|
knsctl add domain.tld --class dnssec|public BREAK-GLASS
|
|
knsctl remove domain.tld BREAK-GLASS - read the
|
|
ordering warning first
|
|
knsctl help
|
|
|
|
Every knotc command here blocks (-b). Without it knotc reports OK when the
|
|
command was SENT, not when it succeeded -- a rejected zone looks green.
|
|
|