Allow server and management VLANs to query the DNS

Broaden ALLOWED_CLIENTS from the console VLAN alone to also include the server
VLAN (192.168.20.0/24) and the trusted management VLAN (192.168.10.0/27) so the
resolver can be tested and administered from those networks. The consoles still
only require the 192.168.40.0/28 range.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
2026-10-11 13:27:52 +01:00
co-authored by Claude Opus 4.8
parent 7292a500eb
commit 9f28b8e2a1
4 changed files with 28 additions and 19 deletions
+8 -4
View File
@@ -26,12 +26,16 @@ FORWARDED_DOMAINS = frozenset(
)
UPSTREAM_DNS = str(ipaddress.ip_address(os.environ.get("UPSTREAM_DNS", "1.1.1.1")))
UPSTREAM_TIMEOUT = 3.0
# Source networks allowed to query the DNS service (PS5 VLAN by default).
# Accepts comma-separated individual addresses and CIDR ranges; empty disables
# the filter and serves every client.
# Source networks allowed to query the DNS service. Defaults to the console VLAN
# plus the server and trusted-management VLANs. Accepts a comma-separated mix of
# individual addresses and CIDR ranges; empty disables the filter and serves
# every client.
ALLOWED_CLIENTS = tuple(
ipaddress.ip_network(entry.strip(), strict=False)
for entry in os.environ.get("ALLOWED_CLIENTS", "192.168.40.0/28").split(",")
for entry in os.environ.get(
"ALLOWED_CLIENTS",
"192.168.40.0/28,192.168.20.0/24,192.168.10.0/27",
).split(",")
if entry.strip()
)
CERTIFICATE = "/srv/certificates/manuals.crt"