DNS 확인/해결이 Fedora 35에서 작동하지 않음

DNS 확인/해결이 Fedora 35에서 작동하지 않음

내 노트북에서 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

dig127.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을 끄면 가상 네트워크 연결이 끊어지고 전체 구문 분석 기능이 사용되었습니다.

다른 사람들이 유용하다고 생각할 경우를 대비하여 여기에 넣습니다.

관련 정보