Windows 10 内で WSL2、Ubuntu 22 を実行しています。VPNnslookup
に接続しないと、次の結果が得られます (すべての回答は FQDN google.com の異なる IP アドレスであることに注意してください)。
daniel@DESKTOP-6M0RKK1:~
⤷ nslookup google.com
Server: 172.23.144.1
Address: 172.23.144.1#53
Non-authoritative answer:
Name: google.com
Address: 142.251.116.139
Name: google.com
Address: 142.251.116.102
Name: google.com
Address: 142.251.116.100
Name: google.com
Address: 142.251.116.113
Name: google.com
Address: 142.251.116.101
Name: google.com
Address: 142.251.116.138
ただし、VPN に接続すると、回答が変わり、一部の DNS サーバーの IP アドレスの回答も表示されます。
daniel@DESKTOP-6M0RKK1:~
⤷ nslookup google.com
Server: 172.23.144.1
Address: 172.23.144.1#53
Non-authoritative answer:
Name: google.com
Address: 142.251.135.110
Name: ns1.google.com
Address: 216.239.32.10
Name: ns2.google.com
Address: 216.239.34.10
Name: ns3.google.com
Address: 216.239.36.10
Name: ns4.google.com
Address: 216.239.38.10
私は の例を示していますgoogle.com
が、これは私が検索しようとするどの URL でも発生します。そしてこれが症状です。本当の問題は、他のコマンド ( などcurl
) が要求時に解決リストからランダムな(?) IP を使用しており、要求が最初の IP に送信されて正常に実行されることもありますが、要求が正しい IP ではなく DNS サーバーに送信されてしまうこともあります。
現時点では、どこで問題を確認すればよいかわかりません。問題が WSL の設定ミスなのか、Windows ネットワークなのか、あるいは VPN の DNS サーバーなのかはわかりません。そのため、どのような助けでも大歓迎です。
Ps.: Windows から直接の解決は、VPN が接続された状態では正常に機能します。問題は WSL 内でのみ発生します。
編集: デバッグ出力を追加します。ルックアップで WSL インターフェイス ゲートウェイがネーム サーバーとして使用される場合、Authority
レコードAdditional
がマージされているようです。Answers
nslookup -debug google.com
WSL2 システムからの出力。
このコマンドは、WSL ゲートウェイをネームサーバーとして使用し、VPN ネームサーバーに要求を送信します。
daniel@DESKTOP-6M0RKK1:~
⤷ nslookup -debug google.com
Server: 172.23.144.1
Address: 172.23.144.1#53
------------
QUESTIONS:
google.com, type = A, class = IN
ANSWERS:
-> google.com
internet address = 142.251.133.174
ttl = 0
-> ns1.google.com
internet address = 216.239.32.10
ttl = 0
-> ns2.google.com
internet address = 216.239.34.10
ttl = 0
-> ns3.google.com
internet address = 216.239.36.10
ttl = 0
-> ns4.google.com
internet address = 216.239.38.10
ttl = 0
AUTHORITY RECORDS:
ADDITIONAL RECORDS:
------------
Non-authoritative answer:
Name: google.com
Address: 142.251.133.174
Name: ns1.google.com
Address: 216.239.32.10
Name: ns2.google.com
Address: 216.239.34.10
Name: ns3.google.com
Address: 216.239.36.10
Name: ns4.google.com
Address: 216.239.38.10
nslookup -debug google.com 10.0.24.151
WSL2 システムからの出力。
このコマンドは VPN ネームサーバーを直接使用する必要があります。
daniel@DESKTOP-6M0RKK1:~
⤷ nslookup -debug google.com 10.0.24.151
Server: 10.0.24.151
Address: 10.0.24.151#53
------------
QUESTIONS:
google.com, type = A, class = IN
ANSWERS:
-> google.com
internet address = 142.251.133.174
ttl = 227
AUTHORITY RECORDS:
-> google.com
nameserver = ns1.google.com.
ttl = 5636
-> google.com
nameserver = ns2.google.com.
ttl = 5636
-> google.com
nameserver = ns4.google.com.
ttl = 5636
-> google.com
nameserver = ns3.google.com.
ttl = 5636
ADDITIONAL RECORDS:
-> ns1.google.com
internet address = 216.239.32.10
ttl = 92272
-> ns2.google.com
internet address = 216.239.34.10
ttl = 92272
-> ns3.google.com
internet address = 216.239.36.10
ttl = 18575
-> ns4.google.com
internet address = 216.239.38.10
ttl = 18575
------------
Non-authoritative answer:
Name: google.com
Address: 142.251.133.174
nslookup -d google.com
Windowsからの出力。
このコマンドは、VPN ネームサーバーを直接使用する必要があります。出力は、私が勤務する会社に関連する名前が表示されないように編集されています。
PS C:\Users\danie> nslookup -d google.com
------------
Got answer:
HEADER:
opcode = QUERY, id = 1, rcode = NOERROR
header flags: response, auth. answer, want recursion, recursion avail.
questions = 1, answers = 1, authority records = 7, additional = 7
QUESTIONS:
151.24.0.10.in-addr.arpa, type = PTR, class = IN
ANSWERS:
-> 151.24.0.10.in-addr.arpa
name = s2-<redacted>
ttl = 900 (15 mins)
AUTHORITY RECORDS:
-> 10.in-addr.arpa
nameserver = s17-<redacted>
ttl = 900 (15 mins)
-> 10.in-addr.arpa
nameserver = s343-<redacted>
ttl = 900 (15 mins)
-> 10.in-addr.arpa
nameserver = s2-<redacted>
ttl = 900 (15 mins)
-> 10.in-addr.arpa
nameserver = s344-<redacted>
ttl = 900 (15 mins)
-> 10.in-addr.arpa
nameserver = s1-<redacted>
ttl = 900 (15 mins)
-> 10.in-addr.arpa
nameserver = <redacted>
ttl = 900 (15 mins)
-> 10.in-addr.arpa
nameserver = <redacted>
ttl = 900 (15 mins)
ADDITIONAL RECORDS:
-> s1-<redacted>
internet address = 10.0.16.253
ttl = 900 (15 mins)
-> <redacted>
internet address = 10.17.0.4
ttl = 900 (15 mins)
-> s17-<redacted>
internet address = 10.8.74.34
ttl = 900 (15 mins)
-> <redacted>
internet address = 10.58.0.240
ttl = 900 (15 mins)
-> s2-<redacted>
internet address = 10.0.24.151
ttl = 900 (15 mins)
-> s343-<redacted>
internet address = 10.0.29.143
ttl = 900 (15 mins)
-> s344-<redacted>
internet address = 10.0.29.144
ttl = 900 (15 mins)
------------
Server: s2-<redacted>
Address: 10.0.24.151
------------
Got answer:
HEADER:
opcode = QUERY, id = 2, rcode = NXDOMAIN
header flags: response, auth. answer, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 1, additional = 0
QUESTIONS:
google.com.<redated_internal_suffix>, type = A, class = IN
AUTHORITY RECORDS:
-> <redated_internal_suffix>
ttl = 900 (15 mins)
primary name server = s2-<redacted>.<redated_internal_suffix>
responsible mail addr = root.s2-<redacted>
serial = 2023071101
refresh = 86400 (1 day)
retry = 7200 (2 hours)
expire = 2592000 (30 days)
default TTL = 345600 (4 days)
------------
------------
Got answer:
HEADER:
opcode = QUERY, id = 3, rcode = NXDOMAIN
header flags: response, auth. answer, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 1, additional = 0
QUESTIONS:
google.com.<redated_internal_suffix>, type = AAAA, class = IN
AUTHORITY RECORDS:
-> <redated_internal_suffix>
ttl = 900 (15 mins)
primary name server = s2-<redacted>
responsible mail addr = root.s2-<redacted>
serial = 2023071101
refresh = 86400 (1 day)
retry = 7200 (2 hours)
expire = 2592000 (30 days)
default TTL = 345600 (4 days)
------------
------------
Got answer:
HEADER:
opcode = QUERY, id = 4, rcode = NOERROR
header flags: response, want recursion, recursion avail.
questions = 1, answers = 1, authority records = 4, additional = 8
QUESTIONS:
google.com, type = A, class = IN
ANSWERS:
-> google.com
internet address = 142.250.79.14
ttl = 23 (23 secs)
AUTHORITY RECORDS:
-> google.com
nameserver = ns2.google.com
ttl = 6075 (1 hour 41 mins 15 secs)
-> google.com
nameserver = ns4.google.com
ttl = 6075 (1 hour 41 mins 15 secs)
-> google.com
nameserver = ns3.google.com
ttl = 6075 (1 hour 41 mins 15 secs)
-> google.com
nameserver = ns1.google.com
ttl = 6075 (1 hour 41 mins 15 secs)
ADDITIONAL RECORDS:
-> ns1.google.com
internet address = 216.239.32.10
ttl = 92711 (1 day 1 hour 45 mins 11 secs)
-> ns2.google.com
internet address = 216.239.34.10
ttl = 92711 (1 day 1 hour 45 mins 11 secs)
-> ns3.google.com
internet address = 216.239.36.10
ttl = 19014 (5 hours 16 mins 54 secs)
-> ns4.google.com
internet address = 216.239.38.10
ttl = 19014 (5 hours 16 mins 54 secs)
-> ns1.google.com
AAAA IPv6 address = 2001:4860:4802:32::a
ttl = 160225 (1 day 20 hours 30 mins 25 secs)
-> ns2.google.com
AAAA IPv6 address = 2001:4860:4802:34::a
ttl = 160225 (1 day 20 hours 30 mins 25 secs)
-> ns3.google.com
AAAA IPv6 address = 2001:4860:4802:36::a
ttl = 160225 (1 day 20 hours 30 mins 25 secs)
-> ns4.google.com
AAAA IPv6 address = 2001:4860:4802:38::a
ttl = 160225 (1 day 20 hours 30 mins 25 secs)
------------
Non-authoritative answer:
------------
Got answer:
HEADER:
opcode = QUERY, id = 5, rcode = NOERROR
header flags: response, want recursion, recursion avail.
questions = 1, answers = 1, authority records = 4, additional = 8
QUESTIONS:
google.com, type = AAAA, class = IN
ANSWERS:
-> google.com
AAAA IPv6 address = 2800:3f0:4004:808::200e
ttl = 41 (41 secs)
AUTHORITY RECORDS:
-> google.com
nameserver = ns1.google.com
ttl = 6075 (1 hour 41 mins 15 secs)
-> google.com
nameserver = ns3.google.com
ttl = 6075 (1 hour 41 mins 15 secs)
-> google.com
nameserver = ns4.google.com
ttl = 6075 (1 hour 41 mins 15 secs)
-> google.com
nameserver = ns2.google.com
ttl = 6075 (1 hour 41 mins 15 secs)
ADDITIONAL RECORDS:
-> ns1.google.com
internet address = 216.239.32.10
ttl = 92711 (1 day 1 hour 45 mins 11 secs)
-> ns2.google.com
internet address = 216.239.34.10
ttl = 92711 (1 day 1 hour 45 mins 11 secs)
-> ns3.google.com
internet address = 216.239.36.10
ttl = 19014 (5 hours 16 mins 54 secs)
-> ns4.google.com
internet address = 216.239.38.10
ttl = 19014 (5 hours 16 mins 54 secs)
-> ns1.google.com
AAAA IPv6 address = 2001:4860:4802:32::a
ttl = 160225 (1 day 20 hours 30 mins 25 secs)
-> ns2.google.com
AAAA IPv6 address = 2001:4860:4802:34::a
ttl = 160225 (1 day 20 hours 30 mins 25 secs)
-> ns3.google.com
AAAA IPv6 address = 2001:4860:4802:36::a
ttl = 160225 (1 day 20 hours 30 mins 25 secs)
-> ns4.google.com
AAAA IPv6 address = 2001:4860:4802:38::a
ttl = 160225 (1 day 20 hours 30 mins 25 secs)
------------
Name: google.com
Addresses: 2800:3f0:4004:808::200e
142.250.79.14
編集 2: これは、WSL 用に作成された内部 DNS サーバー (Windows インターネット接続共有 (ICS) である内部 Hyper-V DNS サーバー) の問題に関連しているようです。
WSL の GitHub で、多くの人がこの問題について不満を述べている未解決の問題を見つけました。