Introduction
I’d like to share a recurring issue I encountered on my NS8 installation, which I investigated and resolved with the help of Claude (Anthropic’s AI assistant). I’m posting this here in case it reflects a structural problem worth fixing upstream — but if this turns out to be a misconfiguration on my end, I’d equally welcome guidance from the community or support team.
The issue reproducibly reappears after every NS8 core update, which suggests the fix belongs in the codebase rather than as a manual post-update patch.
@davidep @giacomo — tagging you as the relevant contributors based on recent core changes.
Bug Report / Community Post for NethServer
Observation
After every NS8 core update, DNS resolution on the host becomes slow (3–5 seconds per query) or fails entirely with timeouts. The symptom appears immediately after the update and persists until manually corrected. Affected services include all containers using --network=host, rclone/restic backup, and Redis connectivity.
ss -tulpn | grep :53 shows dns[master] bound to the Samba-DC IP on the host, but queries to that IP time out or respond with high latency.
Suspected Root Cause
/home/samba1/.config/bin/print-nameservers reads /etc/resolv.conf via Python’s dns.resolver.Resolver() and passes all listed nameservers to Samba-DC as DNS forwarders. If the Samba-DC’s own IP (e.g. 172.17.0.235) is listed in /etc/resolv.conf — which is a valid and intentional configuration when containers need to resolve internal split-horizon zones — Samba-DC sets itself as a forwarder, creating a DNS loopback.
Contributing Factor / Possible Misconfiguration
It is acknowledged that the initial network configuration used DHCP, which may have populated /etc/resolv.conf with nameserver entries that were later manually adjusted. However, having the Samba-DC IP as the primary nameserver in /etc/resolv.conf is a legitimate and recommended setup for NS8 nodes hosting a Samba-DC — it enables internal split-horizon DNS resolution for all host-network services. The loopback risk therefore exists in any standard NS8 deployment where the node also runs Samba-DC.
Additionally, print-nameservers is overwritten on every core update, meaning any manual patch is lost silently.
Fix Applied
Patched /home/samba1/.config/bin/print-nameservers to filter out the Samba-DC’s own IP from the forwarder list:
import dns.resolver
rsv = dns.resolver.Resolver()
filtered = [ns for ns in rsv.nameservers if ns != 'my.networl.0.ip']
print(" ".join(filtered))
Proposed Solution
The print-nameservers script should natively exclude any IP listed in Samba’s own interfaces directive from the forwarder list. These IPs are already known from smb.conf and can be filtered dynamically. A self-referencing DNS forwarder loop cannot be intentional in any deployment scenario and should be structurally prevented rather than requiring manual post-update patches.