File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
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:'
@@ -33,10 +42,16 @@ resolvectl revert "$IFACE"
3342# Set DNS with local server FIRST (this makes it primary)
3443resolvectl dns " $IFACE " " $LOCAL_DNS " " $ORIGINAL_DNS "
3544
45+ # Flush DNS cache
46+ resolvectl flush-caches
47+
3648# Confirm setup
3749echo -e " \nUpdated configuration:"
3850resolvectl status
3951
52+ # Check again what's managing your interface
53+ networkctl status eth0
54+
4055echo -e " \nTesting DNS resolution..."
4156
4257# Test if our local DNS is working
You can’t perform that action at this time.
0 commit comments