File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 1717
1818echo " Using interface: $IFACE "
1919
20+ # Check if NetworkManager is running
21+ systemctl is-active NetworkManager || echo " NetworkManager disabled"
22+
23+ # Check if systemd-networkd is running
24+ systemctl is-active systemd-networkd || echo " systemd-networkd disabled"
25+
26+ # Check what's managing your interface
27+ networkctl status eth0
28+
2029# Get current DNS server
2130echo " Current configuration:"
2231resolvectl status " $IFACE " | grep -E ' Current DNS Server:|DNS Servers:'
@@ -31,12 +40,19 @@ echo "Setting DNS to $LOCAL_DNS for $IFACE (with fallback to $ORIGINAL_DNS)"
3140resolvectl revert " $IFACE "
3241
3342# Set DNS with local server FIRST (this makes it primary)
34- resolvectl dns " $IFACE " " $LOCAL_DNS " " $ORIGINAL_DNS "
43+ # resolvectl dns "$IFACE" "$LOCAL_DNS" "$ORIGINAL_DNS"
44+ resolvectl dns " $IFACE " " $LOCAL_DNS "
45+
46+ # Flush DNS cache
47+ resolvectl flush-caches
3548
3649# Confirm setup
3750echo -e " \nUpdated configuration:"
3851resolvectl status
3952
53+ # Check again what's managing your interface
54+ networkctl status eth0
55+
4056echo -e " \nTesting DNS resolution..."
4157
4258# Test if our local DNS is working
You can’t perform that action at this time.
0 commit comments