mirror of
https://github.com/LukeHagar/omarchy.git
synced 2025-12-06 04:20:23 +00:00
Empty DNS= and FallbackDNS= in resolved.conf were blocking VPN DNS servers when VPN clients replaced /etc/resolv.conf. Removing these empty values allows systemd-resolved to: - Use DHCP DNS from network interfaces (existing behavior) - Fall back to system defaults when needed - Switch to 'foreign' mode for VPN DNS override Fixes #1509
8 lines
325 B
Bash
8 lines
325 B
Bash
echo "Fix DHCP DNS to allow VPN DNS override"
|
|
|
|
if [ -f /etc/systemd/resolved.conf ]; then
|
|
if grep -q "^DNS=$" /etc/systemd/resolved.conf && grep -q "^FallbackDNS=$" /etc/systemd/resolved.conf; then
|
|
sudo sed -i '/^DNS=$/d; /^FallbackDNS=$/d' /etc/systemd/resolved.conf
|
|
sudo systemctl restart systemd-resolved
|
|
fi
|
|
fi |