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 17
17
18
18
echo " Using interface: $IFACE "
19
19
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
+
20
29
# Get current DNS server
21
30
echo " Current configuration:"
22
31
resolvectl status " $IFACE " | grep -E ' Current DNS Server:|DNS Servers:'
@@ -33,10 +42,16 @@ resolvectl revert "$IFACE"
33
42
# Set DNS with local server FIRST (this makes it primary)
34
43
resolvectl dns " $IFACE " " $LOCAL_DNS " " $ORIGINAL_DNS "
35
44
45
+ # Flush DNS cache
46
+ resolvectl flush-caches
47
+
36
48
# Confirm setup
37
49
echo -e " \nUpdated configuration:"
38
50
resolvectl status
39
51
52
+ # Check again what's managing your interface
53
+ networkctl status eth0
54
+
40
55
echo -e " \nTesting DNS resolution..."
41
56
42
57
# Test if our local DNS is working
You can’t perform that action at this time.
0 commit comments