Adopt nanoDNS-style INI config for the guide gateway
Replace the gateway's env-var DNS policy with docker/nanodns.ini, modelled on https://github.com/drakmor/nanoDNS#config: [general] (redirect_url, allowed_clients), [upstream] (ordered resolver list + timeout_ms), [overrides] (mask = IPv4 spoof) and [exceptions] (masks forwarded upstream). Masks use shell-style wildcards and match case-insensitively; resolution order is exceptions -> overrides -> NXDOMAIN. The unmatched-name behaviour is deliberately inverted from upstream nanoDNS: names matching no rule return NXDOMAIN (default-deny) instead of being forwarded, so PSN, updates and telemetry stay blocked. The source-client allowlist now lives in [general] allowed_clients. The INI is baked into the image; CONFIG_FILE can point at a mounted file for per-host overrides. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
+3
-6
@@ -17,12 +17,9 @@ services:
|
||||
ps5-guide-gateway:
|
||||
image: relapse-exploit:local
|
||||
command: ["python", "/srv/guide_gateway.py"]
|
||||
environment:
|
||||
GATEWAY_IP: "${GATEWAY_IP:-192.168.20.30}"
|
||||
REDIRECT_URL: "${GUIDE_REDIRECT_URL:-http://192.168.20.30:8000/}"
|
||||
FORWARDED_DOMAINS: "${FORWARDED_DOMAINS:-homebrew.page,itsplk.github.io,store.spectrumlibrary.online,api.github.com,github.com,raw.githubusercontent.com,release-assets.githubusercontent.com,prosperopatches.com,cdn.prosperopatches.com,image.api.playstation.com,gmedia.playstation.com}"
|
||||
UPSTREAM_DNS: "${UPSTREAM_DNS:-1.1.1.1}"
|
||||
ALLOWED_CLIENTS: "${ALLOWED_CLIENTS:-192.168.40.0/28,192.168.20.0/24,192.168.10.0/27}"
|
||||
# DNS policy (overrides, exceptions, upstreams, allowed client VLANs) lives in
|
||||
# docker/nanodns.ini, baked into the image. Set CONFIG_FILE to point at a
|
||||
# different mounted file for per-host customisation.
|
||||
ports:
|
||||
- "${GATEWAY_BIND_IP:-192.168.20.30}:53:8053/udp"
|
||||
- "${GATEWAY_BIND_IP:-192.168.20.30}:53:8053/tcp"
|
||||
|
||||
Reference in New Issue
Block a user