working ig

This commit is contained in:
nick committed 2026-07-16 00:54:33 -07:00
1 parent b834cd06f3
commit c14be296a8
13 files changed
+242 -24

No files matched your search

+19
View File
@@ -77,4 +77,23 @@ ensure_fwd_zone ad.oswaldtheotter.net "$OSWALD_DC_IP"
ensure_fwd_zone 20.168.192.in-addr.arpa "$TROCH_DC1_IP" "$TROCH_DC2_IP"
ensure_fwd_zone 7.168.192.in-addr.arpa "$OSWALD_DC_IP"
# Primary zones for VPN client registration (openvpn learn-address hook
# writes <username>.$VPN_DNS_ZONE A records + PTRs for 172.31.8.0/24)
ensure_primary_zone() {
zone=$1
if zone_exists "$zone"; then
echo "zone $zone already exists — leaving as-is"
return 0
fi
echo "creating primary zone $zone"
curl -sf -H "$AUTH" -G "$API/zones/create" \
--data-urlencode "zone=$zone" \
--data-urlencode "type=Primary" | api_ok
}
if [ -n "${VPN_DNS_ZONE:-}" ]; then
ensure_primary_zone "$VPN_DNS_ZONE"
ensure_primary_zone "8.31.172.in-addr.arpa"
fi
echo "Technitium AD forwarder zones OK."