internal DNS: lab.internal resolver on the WG hub (dnsmasq on rpi)
WireGuard clients apply the tunnel DNS to the whole device, so the hub resolver answers lab.internal authoritatively and forwards everything else: - dnsmasq on rpi, bound to lo/wg0/wg-remote only, 10.10.0.1 + 10.20.0.2 - grafana.lab.internal, hubble.lab.internal -> 10.10.0.2 (hosts file, one line per record) - ufw: 53 allowed from 10.10.0.0/24, 10.20.0.0/24, 10.244.0.0/16; dropped everywhere else, inserted above the LAN catch-all - docs: zone, per-client instructions (phone is a linode-hub spoke), rollback
This commit is contained in:
parent
48b2b6ac01
commit
ead60fface
6 changed files with 365 additions and 0 deletions
21
infrastructure/networking/internal/dns/install-rpi-dns.sh
Executable file
21
infrastructure/networking/internal/dns/install-rpi-dns.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
# Install the lab.internal resolver on rpi (the WireGuard hub).
|
||||
# Run as root from a checkout of sirius/homek8s:
|
||||
# bash infrastructure/networking/internal/dns/install-rpi-dns.sh
|
||||
#
|
||||
# Re-run after a Pi reinstall or after editing the records. Idempotent.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
install -m 0644 lab-internal.conf /etc/dnsmasq.d/lab-internal.conf
|
||||
install -m 0644 lab-internal.hosts /etc/dnsmasq-lab-internal.hosts
|
||||
|
||||
bash rpi-ufw-dns.sh
|
||||
|
||||
# dnsmasq is already enabled at boot on rpi; make that explicit, not assumed.
|
||||
systemctl enable dnsmasq
|
||||
systemctl restart dnsmasq
|
||||
|
||||
sleep 1
|
||||
systemctl is-active dnsmasq
|
||||
ss -lntup | grep ':53 ' || true
|
||||
Loading…
Reference in a new issue