
私のラップトップでDNSの確認が壊れています。 Fedora 35を実行しています。
この問題は今日始まった。コンピュータは数日間使用されておらず、放電のために動作が停止しました(当時はLinux上でした)。 Win10をダブルブートしましたが、ネットワークは問題ありませんでした...ハードリセットを試してから、Windowsがシャットダウンしたことを確認しました。クイックスタートなしで終了します。
働くもの:
ping 1.1.1.1
またはすべてのIP- 全身
無効、マスク、resolved
修正してresolv.conf
使用すると1.1.1.1
正常に動作します。 (これを投稿するにはどうすればよいですか?)
以下のすべてのデータは、resolv.conf
このコンテンツをブロックおよび禁止する前のデータです。
/etc/resolv.conf:
# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
options edns0 trust-ad
search .
resolvectl status
:
sids@uss-enterprise ~> resolvectl status
Global
Protocols: LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub
Link 2 (eno1)
Current Scopes: none
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Link 3 (wlp4s0)
Current Scopes: LLMNR/IPv4 LLMNR/IPv6
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Link 4 (ipv6leakintrf0)
Current Scopes: DNS
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: ::1
DNS Servers: ::1
DNS Domain: ~.
systemd-resolved
サービスステータス:
sids@uss-enterprise ~> sudo systemctl status systemd-resolved
● systemd-resolved.service - Network Name Resolution
Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/systemd-resolved.service.d
└─override.conf
Active: active (running) since Fri 2021-11-19 20:53:32 IST; 20s ago
Docs: man:systemd-resolved.service(8)
man:org.freedesktop.resolve1(5)
https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
Main PID: 3695 (systemd-resolve)
Status: "Processing requests..."
Tasks: 1 (limit: 18842)
Memory: 8.4M
CPU: 89ms
CGroup: /system.slice/systemd-resolved.service
└─3695 /usr/lib/systemd/systemd-resolved
Nov 19 20:53:32 uss-enterprise systemd-resolved[3695]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.172 path=n/a interface=n/a member=n/a cookie=4294967295 reply_cookie=29 signature=u>
Nov 19 20:53:32 uss-enterprise systemd-resolved[3695]: D-Bus LLMNR change request from client PID 1168 (n/a) with UID 4294967295
Nov 19 20:53:32 uss-enterprise systemd-resolved[3695]: Sent message type=method_return sender=n/a destination=:1.23 path=n/a interface=n/a member=n/a cookie=30 reply_cookie=1545 signature=n/a error-name=n/a error>
Nov 19 20:53:32 uss-enterprise systemd-resolved[3695]: Got message type=method_call sender=:1.23 destination=:1.172 path=/org/freedesktop/resolve1 interface=org.freedesktop.resolve1.Manager member=SetLinkDNS cook>
Nov 19 20:53:32 uss-enterprise systemd-resolved[3695]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=GetConnectionUnixU>
Nov 19 20:53:32 uss-enterprise systemd-resolved[3695]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.172 path=n/a interface=n/a member=n/a cookie=4294967295 reply_cookie=31 signature=u>
Nov 19 20:53:32 uss-enterprise systemd-resolved[3695]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=GetConnectionUnixP>
Nov 19 20:53:32 uss-enterprise systemd-resolved[3695]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.172 path=n/a interface=n/a member=n/a cookie=4294967295 reply_cookie=32 signature=u>
Nov 19 20:53:32 uss-enterprise systemd-resolved[3695]: D-Bus DNS server change request from client PID 1168 (n/a) with UID 4294967295
Nov 19 20:53:32 uss-enterprise systemd-resolved[3695]: Sent message type=method_return sender=n/a destination=:1.23 path=n/a interface=n/a member=n/a cookie=33 reply_cookie=1546 signature=n/a error-name=n/a error>
保証範囲:
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
解決されたログレベル:
sids@uss-enterprise ~> sudo systemctl service-log-level systemd-resolved
debug
奇妙なことは、次の場所にログがまったく表示されないことです(表示されるログも含むsystemctl status
)journalctl
。
sids@uss-enterprise ~> sudo journalctl -u systemd-resolved -f
-- Journal begins at Sun 2021-10-31 18:01:42 IST. --
Nov 21 20:39:41 uss-enterprise systemd-resolved[1119]: proton0: Bus client set DNS server list to: 10.18.0.1
Nov 21 20:39:41 uss-enterprise systemd-resolved[1119]: ipv6leakintrf0: Bus client set default route setting: no
Nov 21 22:10:41 uss-enterprise systemd-resolved[1119]: ipv6leakintrf0: Bus client set search domain list to: ~.
Nov 21 22:10:41 uss-enterprise systemd-resolved[1119]: ipv6leakintrf0: Bus client set default route setting: yes
Nov 21 22:10:41 uss-enterprise systemd-resolved[1119]: ipv6leakintrf0: Bus client set DNS server list to: ::1
Nov 21 22:10:41 uss-enterprise systemd-resolved[1119]: proton0: Bus client reset search domain list.
Nov 21 22:10:41 uss-enterprise systemd-resolved[1119]: proton0: Bus client set default route setting: no
Nov 21 22:10:41 uss-enterprise systemd-resolved[1119]: proton0: Bus client reset DNS server list.
Nov 25 00:32:28 uss-enterprise systemd-resolved[1119]: Clock change detected. Flushing caches.
Nov 25 00:53:08 uss-enterprise systemd-resolved[1119]: Clock change detected. Flushing caches.
以下を使用してDNSを解決しようとするいくつかの試みdig
:192.168.22.215は私のルーターのゲートウェイです。
sids@uss-enterprise ~> dig @192.168.22.215 fedoraproject.org
; <<>> DiG 9.16.23-RH <<>> @192.168.22.215 fedoraproject.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44291
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;fedoraproject.org. IN A
;; ANSWER SECTION:
fedoraproject.org. 55 IN A 13.250.126.156
fedoraproject.org. 55 IN A 13.212.21.54
fedoraproject.org. 55 IN A 13.233.183.170
fedoraproject.org. 55 IN A 38.145.60.21
fedoraproject.org. 55 IN A 38.145.60.20
fedoraproject.org. 55 IN A 13.125.120.8
;; Query time: 7 msec
;; SERVER: 192.168.22.215#53(192.168.22.215)
;; WHEN: Fri Nov 19 21:00:15 IST 2021
;; MSG SIZE rcvd: 131
dig
127.0.0.53の使用:
sids@uss-enterprise ~> dig @127.0.0.53 fedoraproject.org
; <<>> DiG 9.16.23-RH <<>> @127.0.0.53 fedoraproject.org
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
編集する:
/etc/systemd/resolved.conf
:
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the resolved.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config.
#
# See resolved.conf(5) for details.
[Resolve]
# Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
# Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
# Google: 8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google
# Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
# DNS=1.1.1.1
#FallbackDNS=
#Domains=
#DNSSEC=no
#DNSOverTLS=no
#MulticastDNS=no
#LLMNR=resolve
#Cache=yes
#CacheFromLocalhost=no
#DNSStubListener=yes
#DNSStubListenerExtra=
#ReadEtcHosts=yes
#ResolveUnicastSingleLabel=no
dig
そして127.0.0.1
:
dig @127.0.0.1 fedoraproject.org
; <<>> DiG 9.16.23-RH <<>> @127.0.0.1 fedoraproject.org
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
nmapが有効127.0.0.53
sids@uss-enterprise ~ [9]> sudo nmap -sU 127.0.0.53 -p 53
[sudo] password for sids:
Starting Nmap 7.91 ( https://nmap.org ) at 2021-11-26 01:06 IST
Nmap scan report for localhost (127.0.0.53)
Host is up.
PORT STATE SERVICE
53/udp open|filtered domain
Nmap done: 1 IP address (1 host up) scanned in 2.11 seconds
nmapをオンにする127.0.0.1
:
sids@uss-enterprise ~> sudo nmap -sU 127.0.0.1 -p 53
Starting Nmap 7.91 ( https://nmap.org ) at 2021-11-26 01:06 IST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000042s latency).
PORT STATE SERVICE
53/udp closed domain
Nmap done: 1 IP address (1 host up) scanned in 0.07 seconds
/run/systemd/resolve/stub-resolv.conf
シンボリックリンク、/etc/resolv.conf
上記参照
/run/systemd/resolve/resolv.conf
:
# This is /run/systemd/resolve/resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver ::1
search .
答え1
修理する!
これは壊れたVPN設定です。デバイスがLinuxで放電されたと言及したことを覚えていますか?
当時、VPN接続が有効になってDNS漏洩防止を行っていたため、DNS解決用に仮想ネットワークインターフェイスを設定しました。
再起動後もネットワークはまだアクティブになっていますが、VPNは実行されず、すべてが削除されます。
VPNを起動して動作を開始しました。 VPN をオフにすると仮想ネットワーク接続が失われ、完全な解析機能が使用されました。
他の人が役に立つと思う場合に備えてここに入れます。