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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user