You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix DNS resolution for VPN and private network configurations
PR #167 introduced DNS filtering that excluded all private IP addresses
(10.x, 172.16-31.x, 192.168.x, fc00::/7) assuming they would be
unreachable from QEMU's slirp networking. However, this breaks VPN
scenarios where private DNS servers are actually reachable.
This change removes the overly aggressive private IP filtering, now
only filtering out localhost and link-local addresses. Private network
DNS servers are allowed through since they may be reachable (e.g., via
VPN or air-gapped networks). If they're actually unreachable, DNS will
fail naturally, which is better than prematurely filtering them out.
Also downgraded the fallback warning from WARN to debug level since
falling back to public DNS is a normal case, not an error condition.
Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: gursewak1997 <gursmangat@gmail.com>
// QEMU's slirp reads /etc/resolv.conf from the container's network namespace,
586
584
// which would otherwise contain unreachable bridge DNS servers (e.g., 169.254.1.1).
587
585
// Using --dns properly configures /etc/resolv.conf in the container.
588
-
let host_dns_servers = read_host_dns_servers().or_else(|| {
589
-
// Fallback to public DNS if no usable DNS found in system configuration
590
-
// This ensures DNS works even when host has broken/unreachable DNS config
591
-
warn!("No usable DNS servers found in system configuration, falling back to public DNS (8.8.8.8, 1.1.1.1). This may not work in air-gapped environments.");
0 commit comments