Skip to content

Commit e0b8cf0

Browse files
committed
Add some extra resolvectl debugging and use only local
1 parent f0a7516 commit e0b8cf0

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

ext/standard/tests/dns/resolv-setup.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ fi
1717

1818
echo "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
2130
echo "Current configuration:"
2231
resolvectl 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)"
3140
resolvectl 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
3750
echo -e "\nUpdated configuration:"
3851
resolvectl status
3952

53+
# Check again what's managing your interface
54+
networkctl status eth0
55+
4056
echo -e "\nTesting DNS resolution..."
4157

4258
# Test if our local DNS is working

0 commit comments

Comments
 (0)