docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.85k stars 285 forks source link

ipv6 address incorrect ::ffff:172.253.115.138,but use nameserver 8.8.8.8 correct #13122

Open zhizhi10 opened 1 year ago

zhizhi10 commented 1 year ago

Actual behavior

Local DNS return invalid ip adddress, like ::ffff:172.253.115.100 Here is from dig command, root@docker-desktop:/# cat /etc/resolv.conf nameserver 192.168.65.5 root@docker-desktop:/# dig AAAA google.com

; <<>> DiG 9.16.1-Ubuntu <<>> AAAA google.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51835 ;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ; COOKIE: ecb4f2223a500193 (echoed) ;; QUESTION SECTION: ;google.com. IN AAAA

;; ANSWER SECTION: google.com. 0 IN AAAA ::ffff:172.253.115.138 google.com. 0 IN AAAA ::ffff:172.253.115.139 google.com. 0 IN AAAA ::ffff:172.253.115.113 google.com. 0 IN AAAA ::ffff:172.253.115.102 google.com. 0 IN AAAA ::ffff:172.253.115.100 google.com. 0 IN AAAA ::ffff:172.253.115.101

;; Query time: 10 msec ;; SERVER: 192.168.65.5#53(192.168.65.5) ;; WHEN: Mon Dec 12 05:52:28 UTC 2022 ;; MSG SIZE rcvd: 279

Expected behavior

Correct ip v6 address is similar 2607:f8b0:4004:c09::8a, after change dns to 8.8.8.8.

root@docker-desktop:/# cat /etc/resolv.conf nameserver 8.8.8.8 root@docker-desktop:/# dig AAAA google.com

; <<>> DiG 9.16.1-Ubuntu <<>> AAAA google.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12497 ;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;google.com. IN AAAA

;; ANSWER SECTION: google.com. 300 IN AAAA 2607:f8b0:4004:c09::8a google.com. 300 IN AAAA 2607:f8b0:4004:c09::71 google.com. 300 IN AAAA 2607:f8b0:4004:c09::64 google.com. 300 IN AAAA 2607:f8b0:4004:c09::8b

;; Query time: 10 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Mon Dec 12 05:51:31 UTC 2022 ;; MSG SIZE rcvd: 151

Information

Output of & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check

[2022-12-12T06:10:57.478859000Z][com.docker.diagnose.exe][I] set path configuration to OnHost Starting diagnostics

[PASS] DD0027: is there available disk space on the host? [PASS] DD0028: is there available VM disk space? [PASS] DD0002: does the bootloader have virtualization enabled? [SKIP] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled? [PASS] DD0021: is the WSL 2 Windows Feature enabled? [PASS] DD0024: is WSL installed? [PASS] DD0025: are WSL distros installed? [PASS] DD0026: is the WSL LxssManager service running? [PASS] DD0029: is the WSL 2 Linux filesystem corrupt? [PASS] DD0035: is the VM time synchronized? [PASS] DD0017: can a VM be started? [PASS] DD0016: is the LinuxKit VM running? [PASS] DD0011: are the LinuxKit services running? [PASS] DD0004: is the Docker engine running? [PASS] DD0015: are the binary symlinks installed? [PASS] DD0031: does the Docker API work? [PASS] DD0013: is the $PATH ok? [PASS] DD0003: is the Docker CLI working? [PASS] DD0005: is the user in the docker-users group? [PASS] DD0014: are the backend processes running? [PASS] DD0007: is the backend responding? [PASS] DD0008: is the native API responding? [PASS] DD0009: is the vpnkit API responding? [PASS] DD0010: is the Docker API proxy responding? [PASS] DD0006: is the Docker Desktop Service responding? [PASS] DD0012: is the VM networking working? [SKIP] DD0030: is the image access management authorized? [PASS] DD0033: does the host have Internet access? [PASS] DD0002: does the bootloader have virtualization enabled? [PASS] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled? [PASS] DD0021: is the WSL 2 Windows Feature enabled? [PASS] DD0024: is WSL installed? [PASS] DD0025: are WSL distros installed? [PASS] DD0026: is the WSL LxssManager service running? [PASS] DD0029: is the WSL 2 Linux filesystem corrupt? [PASS] DD0035: is the VM time synchronized? [PASS] DD0017: can a VM be started? [PASS] DD0016: is the LinuxKit VM running? [PASS] DD0011: are the LinuxKit services running? [PASS] DD0004: is the Docker engine running? [PASS] DD0015: are the binary symlinks installed? [PASS] DD0031: does the Docker API work? [PASS] DD0032: do Docker networks overlap with host IPs? No fatal errors detected.

Steps to reproduce the behavior

  1. ...
  2. ...
mlocati commented 1 year ago

Yep: DNS resolution seems quite broken...

Here's a couple of commands executed on a bare metal Ubuntu:

# nslookup -type=TXT mxtoolbox.com
Server:         1.1.1.1
Address:        1.1.1.1#53

Non-authoritative answer:
mxtoolbox.com   text = "google-site-verification=a72lcHiaH48r427O4d4O6SrvOBQkmH4IGZ98mH9YWwU"
mxtoolbox.com   text = "lml8nrmxdc063ms0skf3bnvm2zvslffz"
mxtoolbox.com   text = "v=spf1 redirect=mxtoolbox.com.hosted.spf-report.com"

Authoritative answers can be found from:

# nslookup -type=TXT bbc.co.uk
;; Truncated, retrying in TCP mode.
Server:         1.1.1.1
Address:        1.1.1.1#53

Non-authoritative answer:
bbc.co.uk       text = "_globalsign-domain-verification=AQ2dURU9RbDOuheuLrx89LSUlA_btgMS6vmFXngBtE"
bbc.co.uk       text = "miro-verification=1a94b0fef7a6d5136a272d5cb425e8dc034e8cfc"
bbc.co.uk       text = "v=spf1 a ip4:212.58.224.0/19 ip4:132.185.0.0/16 ip4:78.136.53.80/28 ip4:78.136.14.192/27 ip4:78.136.19.8/29 ip4:89.234.10.72/29 ip4:89.234.53.236 ip4:212.111.33.181 ip4:78.137.117.8 ip4:46.37.176.74 ip4:185.184.237.181" " ip4:185.119.233.144/30 ip4:185.119.232.158 +include:sf.sis.bbc.co.uk +include:spf.messagelabs.com ~all"
bbc.co.uk       text = "docusign=50f10407-e3e4-4f6a-aae4-712d4eb31329"
bbc.co.uk       text = "docusign=a10ad7b6-cf7e-472d-8157-23061f5b5116"
bbc.co.uk       text = "2RLXso9TrRPyhWOEhYggL0U/r1D+g8H7z9RqDBOmcJjSbj88TobGKimtkCrXZNBkDXQDj89lS4mDskNOJyWLdg=="
bbc.co.uk       text = "voUGv5zARbEV516E/S8Ugsy9/FOgDGg4n/rpmKZQRROVOj0+2tgzKw3Tk9+Ks6qVbNKU18KTrR5khxTQutDvBg=="
bbc.co.uk       text = "google-site-verification=ITX3CwHXxGVfkCmhF4eSwdfo8h2ZGLAZ3zRpYvZi5XA"
bbc.co.uk       text = "MS=ms10378910"
bbc.co.uk       text = "dropbox-domain-verification=l5djk65wpy3z"
bbc.co.uk       text = "adobe-idp-site-verification=9b850a4a56e3fac19aea1e0ac5db302e5cefab444cd73519dce1c72ccd4db058"
bbc.co.uk       text = "google-site-verification=RaiMXJBIiFvqXHd43kv_ekzmXT2l8ibq5Xy0mulndvU"
bbc.co.uk       text = "atlassian-domain-verification=SQsgJ5h/FqwMTXuSG/G4Nd1Gx6uX2keREOsZSa22D5XT46EsEuyaic8Aej4cR4Tr"
bbc.co.uk       text = "Huddle"
bbc.co.uk       text = "J0kgGm0XqA3/6pLD4DHeC5x/dAduzT809P1Iwx/PRCYvVS32rv75RIHKC2aVz47dJxKhPlxGf3h3KXiL6+dyXw=="
bbc.co.uk       text = "apple-domain-verification=jFFO0rdS9IrxgWUR"
bbc.co.uk       text = "msfpkey=69eew9c10ryb9cn8msgg2d4vg"
bbc.co.uk       text = "docker-verification=aab67462-78f7-4ade-a86b-358645923430"

Authoritative answers can be found from:

But here's the output of the same commands executed in a docker image:

PS C:\> docker run --rm -it ubuntu:22.04 sh -c 'apt update >/dev/null 2>&1 && apt install -y bind9-dnsutils >/dev/null 2>&1 && nslookup -type=TXT mxtoolbox.com'
Server:         192.168.65.7
Address:        192.168.65.7#53

Non-authoritative answer:
mxtoolbox.com   text = "google-site-verification=a72lcHiaH48r427O4d4O6SrvOBQkmH4IGZ98mH9YWwU" "lml8nrmxdc063ms0skf3bnvm2zvslffz" "v=spf1 redirect=mxtoolbox.com.hosted.spf-report.com"

Authoritative answers can be found from:

PS C:\> docker run --rm -it ubuntu:22.04 sh -c 'apt update >/dev/null 2>&1 && apt install -y bind9-dnsutils >/dev/null 2>&1 && nslookup -type=TXT bbc.co.uk'
Server:         192.168.65.7
Address:        192.168.65.7#53

** server can't find bbc.co.uk: SERVFAIL

We can fix the issue by applying this configuration change:

immagine

Indeed, with that change. we have the correct results:

PS C:\> docker run --rm -it ubuntu:22.04 sh -c 'apt update >/dev/null 2>&1 && apt install -y bind9-dnsutils >/dev/null 2>&1 && nslookup -type=TXT mxtoolbox.com'
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
mxtoolbox.com   text = "google-site-verification=a72lcHiaH48r427O4d4O6SrvOBQkmH4IGZ98mH9YWwU"
mxtoolbox.com   text = "lml8nrmxdc063ms0skf3bnvm2zvslffz"
mxtoolbox.com   text = "v=spf1 redirect=mxtoolbox.com.hosted.spf-report.com"

Authoritative answers can be found from:

PS C:\> docker run --rm -it ubuntu:22.04 sh -c 'apt update >/dev/null 2>&1 && apt install -y bind9-dnsutils >/dev/null 2>&1 && nslookup -type=TXT bbc.co.uk'
;; Truncated, retrying in TCP mode.
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
bbc.co.uk       text = "_globalsign-domain-verification=AQ2dURU9RbDOuheuLrx89LSUlA_btgMS6vmFXngBtE"
bbc.co.uk       text = "miro-verification=1a94b0fef7a6d5136a272d5cb425e8dc034e8cfc"
bbc.co.uk       text = "v=spf1 a ip4:212.58.224.0/19 ip4:132.185.0.0/16 ip4:78.136.53.80/28 ip4:78.136.14.192/27 ip4:78.136.19.8/29 ip4:89.234.10.72/29 ip4:89.234.53.236 ip4:212.111.33.181 ip4:78.137.117.8 ip4:46.37.176.74 ip4:185.184.237.181" " ip4:185.119.233.144/30 ip4:185.119.232.158 +include:sf.sis.bbc.co.uk +include:spf.messagelabs.com ~all"
bbc.co.uk       text = "docusign=50f10407-e3e4-4f6a-aae4-712d4eb31329"
bbc.co.uk       text = "docusign=a10ad7b6-cf7e-472d-8157-23061f5b5116"
bbc.co.uk       text = "2RLXso9TrRPyhWOEhYggL0U/r1D+g8H7z9RqDBOmcJjSbj88TobGKimtkCrXZNBkDXQDj89lS4mDskNOJyWLdg=="
bbc.co.uk       text = "voUGv5zARbEV516E/S8Ugsy9/FOgDGg4n/rpmKZQRROVOj0+2tgzKw3Tk9+Ks6qVbNKU18KTrR5khxTQutDvBg=="
bbc.co.uk       text = "google-site-verification=ITX3CwHXxGVfkCmhF4eSwdfo8h2ZGLAZ3zRpYvZi5XA"
bbc.co.uk       text = "MS=ms10378910"
bbc.co.uk       text = "dropbox-domain-verification=l5djk65wpy3z"
bbc.co.uk       text = "adobe-idp-site-verification=9b850a4a56e3fac19aea1e0ac5db302e5cefab444cd73519dce1c72ccd4db058"
bbc.co.uk       text = "google-site-verification=RaiMXJBIiFvqXHd43kv_ekzmXT2l8ibq5Xy0mulndvU"
bbc.co.uk       text = "atlassian-domain-verification=SQsgJ5h/FqwMTXuSG/G4Nd1Gx6uX2keREOsZSa22D5XT46EsEuyaic8Aej4cR4Tr"
bbc.co.uk       text = "Huddle"
bbc.co.uk       text = "J0kgGm0XqA3/6pLD4DHeC5x/dAduzT809P1Iwx/PRCYvVS32rv75RIHKC2aVz47dJxKhPlxGf3h3KXiL6+dyXw=="
bbc.co.uk       text = "apple-domain-verification=jFFO0rdS9IrxgWUR"
bbc.co.uk       text = "msfpkey=69eew9c10ryb9cn8msgg2d4vg"
bbc.co.uk       text = "docker-verification=aab67462-78f7-4ade-a86b-358645923430"

Authoritative answers can be found from:
docker-robott commented 1 year ago

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

JimCronqvist commented 1 year ago

/remove-lifecycle stale