0

我在网络管理器中配置了一个 OpenVpn,它有自己的 DNS 服务器和搜索域和路由。

~$ systemd-resolve --status tun0 
Link 16 (tun0)
      Current Scopes: DNS
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 11.111.11.1
          DNS Domain: correct_domain.com

使用名称解析进行测试dig是正确的:

dig correct_server.com

; <<>> DiG 9.11.3-1ubuntu1.14-Ubuntu <<>> correct_server.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12750
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;server.correct_domain.com.      IN      A

;; ANSWER SECTION:
server.correct_domain.com. 0     IN      A       11.111.1.192

;; Query time: 124 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Wed Mar 10 12:36:10 CET 2021
;; MSG SIZE  rcvd: 69

但是在与服务器建立 ssh 连接后,名称解析停止工作。

dig correct_server.com

; <<>> DiG 9.11.3-1ubuntu1.14-Ubuntu <<>> correct_server.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 4849
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;correct_server.com.      IN      A

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Wed Mar 10 12:36:23 CET 2021
;; MSG SIZE  rcvd: 53

提前致谢

4

0 回答 0