aly badawy/homelab
all systems operational
// networking · dns

DNS (UniFi)

The UniFi Dream Router 7 provides DNS and DHCP for every VLAN. DNS rewrites for *.in.alybadawy.com resolve directly to the k3s server — no traffic leaves the LAN for internal services.

UDR7 built-in 172.20.Y.1 DNS rewrites per-VLAN DHCP

01 Overview

DNS and DHCP are both handled by the UDR7's built-in resolver. Each VLAN gets its own DHCP scope and is assigned the UDR7 as its DNS server. This gives a single control plane for all network segments:

  • DNS rewrites — internal hostnames (e.g. argo.in.alybadawy.com) resolve to the k3s server IP without leaving the LAN.
  • Per-VLAN DHCP scopes — each VLAN hands out addresses from its own 172.20.Y.0/24 range with the UDR7 gateway and DNS server.
  • AREDN mesh forwardinglocal.mesh queries are forwarded to the AREDN node at 10.6.229.9.
  • Upstream forwarding — all other queries are forwarded to public upstream resolvers.
PropertyValue
DeviceUniFi Dream Router 7 (UDR7)
DNS IP (per VLAN)172.20.Y.1 — each VLAN's gateway is its DNS server (e.g. VLAN 20 → 172.20.20.1, VLAN 10 → 172.20.10.1)
Management UIUniFi Network application on UDR7 (172.20.1.1)
Upstream resolversPrimary: CleanBrowsing-Security — blocks access to malicious websites and content. Secondary: CleanBrowsing-Family — blocks adult content and other inappropriate websites.

02 DNS rewrites for cluster services

All *.in.alybadawy.com hostnames are rewritten in the UDR7 to the k3s server's IP address. Traffic never leaves the network for internal services — it hits the ingress-nginx controller directly on the LAN.

DNS rewrite rule text
*.in.alybadawy.com  →  

# Examples of what resolves:
argo.in.alybadawy.com      →  k3s server
vault.in.alybadawy.com     →  k3s server
grafana.in.alybadawy.com   →  k3s server
auth.in.alybadawy.com      →  k3s server
cloud.in.alybadawy.com     →  k3s server
photos.in.alybadawy.com    →  k3s server

The rewrite is a wildcard entry in the UniFi DNS settings. All subdomains under in.alybadawy.com resolve to the same IP — the k3s node's address on VLAN 20. ingress-nginx on the cluster then routes each hostname to the correct service based on the Ingress rules.

Why Cloudflare CNAME records still exist. The in.alybadawy.com subdomain has CNAME records in Cloudflare pointing to alybadawy.com (unproxied). These are needed so cert-manager's DNS-01 ACME challenge can create _acme-challenge.in.alybadawy.com TXT records that Cloudflare's DNS actually serves. Without them, Cloudflare's DNS wouldn't serve child TXT records. External DNS for in.alybadawy.com intentionally resolves to nothing useful — the services are LAN-only.

03 AREDN mesh forwarding

All local.mesh DNS queries are forwarded to the AREDN mesh node at 10.6.229.9. This lets homelab devices resolve hostnames on the amateur radio mesh network without knowing any mesh-internal addresses.

DomainForwarded toPurpose
*.local.mesh10.6.229.9AREDN mesh node resolver — handles all mesh hostnames
AREDN assigns its own IP scheme. The local.mesh domain and its address ranges are managed entirely by the AREDN firmware — they are not under local control. See arednmesh.org for details on the mesh addressing model.

04 Per-VLAN DHCP

The UDR7 runs a DHCP scope for each VLAN. Clients on each segment get an address from their VLAN's 172.20.Y.0/24 range, with 172.20.Y.1 as both gateway and DNS server.

VLANSubnetGateway / DNS
Management (1)172.20.1.0/24172.20.1.1
Personal (10)172.20.10.0/24172.20.10.1
Servers (20)172.20.20.0/24172.20.20.1
VPN (15)172.20.15.0/24172.20.15.1
IoT (100)172.20.100.0/24172.20.100.1
Guest (200)172.20.200.0/24172.20.200.1
Work (30)172.20.30.0/24172.20.30.1
last updated 2026-06-08