我正在尝试通过特定网络接口路由特定站点 DNS 查询。我有只能通过特定网络接口访问的私人站点,并且我的默认互联网应通过网络接口enp39s0 (eth)
路由。wifi
目前这是我的配置
❯ systemd-resolve --status
Global
Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: foreign
DNS Domain: corp.private-site.com labcorp.private-site.com private-site.com
Link 2 (enp39s0)
Current Scopes: DNS
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.2.1
DNS Servers: 192.168.2.1 10.64.0.1
DNS Domain: corp.private-site.com labcorp.private-site.com private-site.com
Link 3 (wlo1)
Current Scopes: DNS
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 8.8.4.4
DNS Servers: 8.8.8.8 8.8.4.4
Link 5 (docker0)
Current Scopes: none
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
DNS 查找查询
❯ dig k8s0292274-node1.lab3.private-site.com
; <<>> DiG 9.16.15-Ubuntu <<>> k8s0292274-node1.lab3.private-site.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 52201
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;k8s0292274-node1.lab3.private-site.com. IN A
;; AUTHORITY SECTION:
private-site.com XXXXXXXXXXX
;; Query time: 3 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Tue Apr 05 09:59:21 IST 2022
;; MSG SIZE rcvd: 134
IP路由列表
10.64.0.1 via 192.168.2.1 dev enp39s0 proto static metric 1
请帮助我路由所有与*.private-site.com
应路由相关的查询,enp39s0
包括 DNS。