This commit is contained in:
Mateusz Gruszczyński committed 2026-11-23 09:31:05 +01:00
1 parent 6e57b9e1b8
commit 7b8c7e93fb
48 files changed
+1010 -116

No files matched your search

+5 -5
View File
@@ -31,9 +31,9 @@ mkdir -p "$DEV"
[ -f "$DEV/tsig.secret" ] || head -c 32 /dev/urandom | base64 > "$DEV/tsig.secret"
[ -f "$DEV/admin.token" ] || echo "dev-$(head -c 12 /dev/urandom | base64 | tr -dc 'a-zA-Z0-9')" > "$DEV/admin.token"
chmod 600 "$DEV"/*.secret "$DEV"/*.token 2>/dev/null || true
mkdir -p "$DEV/data/zones" # same layout as an installation: zone files in <data_dir>/zones/
[ -f "$DEV/data/zones/example.com.zone" ] || cp "$ROOT/zones/example.com.zone" "$DEV/data/zones/example.com.zone"
[ -f "$DEV/data/zones/reverse.zone" ] || cp "$ROOT/zones/2.0.192.in-addr.arpa.zone" "$DEV/data/zones/reverse.zone"
mkdir -p "$DEV/data/zones/primary" # same layout as an installation: zone files in <data_dir>/zones/primary/
[ -f "$DEV/data/zones/primary/example.com.zone" ] || cp "$ROOT/zones/primary/example.com.zone" "$DEV/data/zones/primary/"
[ -f "$DEV/data/zones/primary/2.0.192.in-addr.arpa.zone" ] || cp "$ROOT/zones/primary/2.0.192.in-addr.arpa.zone" "$DEV/data/zones/primary/"
[ -f "$DEV/block.txt" ] || printf 'ads.example\n*.tracker.example\n' > "$DEV/block.txt"
upstreams_yaml() { local IFS=,; for u in $UPSTREAMS; do printf '"%s", ' "$u"; done | sed 's/, $//'; }
@@ -49,14 +49,14 @@ recursion: { enabled: true, allowed_clients: ["127.0.0.0/8", "::1/128"], dnssec_
zones:
- name: example.com
type: primary
file: zones/example.com.zone
file: zones/primary/example.com.zone
transfer_acl: ["127.0.0.1/32"]
transfer_tsig_key: xfr-key
notify: ["127.0.0.1:$((PORT+1))"]
notify_tsig_key: xfr-key
update_keys: [xfr-key]
update_acl: ["127.0.0.1/32"]$dnssec
- { name: 2.0.192.in-addr.arpa, type: primary, file: zones/reverse.zone }
- { name: 2.0.192.in-addr.arpa, type: primary, file: zones/primary/2.0.192.in-addr.arpa.zone }
forward_zones: []
upstreams: { strategy: fastest, servers: [$(upstreams_yaml)] }
resolution: { default: recursive }