AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home/overview.html
GNU General Public License v3.0
25.66k stars 1.84k forks source link

Error resolving DNS in Alpine Linux WSL in some cases #2960

Closed depler closed 3 years ago

depler commented 3 years ago

Test case:

  1. Install and start Alpine Linux Linux for WSL (use https://github.com/yuk7/wsldl)
  2. Type nslookup dotnet.microsoft.com

Here is result for default DNS server (which is AdGuardHome on 172.25.80.1):

CHINABOX2-BFP9K:~# cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.25.80.1
CHINABOX2-BFP9K:~# nslookup dotnet.microsoft.com
Server:         172.25.80.1
Address:        172.25.80.1:53

Non-authoritative answer:
*** Can't find dotnet.microsoft.com: Parse error

Non-authoritative answer:
*** Can't find dotnet.microsoft.com: Parse error

And here is result for DNS at 192.168.1.3 (which is same AdGuardHome on physical IP):

CHINABOX2-BFP9K:~# nslookup dotnet.microsoft.com 192.168.1.3
Server:         192.168.1.3
Address:        192.168.1.3:53

Non-authoritative answer:
dotnet.microsoft.com    canonical name = dotnetwebsite.azurefd.net
dotnetwebsite.azurefd.net       canonical name = firstparty-azurefd-prod.trafficmanager.net
firstparty-azurefd-prod.trafficmanager.net      canonical name = dual.t-0009.t-msedge.net
dual.t-0009.t-msedge.net        canonical name = t-0009.t-msedge.net
t-0009.t-msedge.net     canonical name = Edge-Prod-STOr3.ctrl.t-0009.t-msedge.net
Edge-Prod-STOr3.ctrl.t-0009.t-msedge.net        canonical name = standard.t-0009.t-msedge.net
Name:   standard.t-0009.t-msedge.net
Address: 2620:1ec:bdf::19
Name:   standard.t-0009.t-msedge.net
Address: 2620:1ec:46::19

Non-authoritative answer:
dotnet.microsoft.com    canonical name = dotnetwebsite.azurefd.net
dotnetwebsite.azurefd.net       canonical name = firstparty-azurefd-prod.trafficmanager.net
firstparty-azurefd-prod.trafficmanager.net      canonical name = dual.t-0009.t-msedge.net
dual.t-0009.t-msedge.net        canonical name = t-0009.t-msedge.net
t-0009.t-msedge.net     canonical name = Edge-Prod-STOr3.ctrl.t-0009.t-msedge.net
Edge-Prod-STOr3.ctrl.t-0009.t-msedge.net        canonical name = standard.t-0009.t-msedge.net
Name:   standard.t-0009.t-msedge.net
Address: 13.107.246.19
Name:   standard.t-0009.t-msedge.net
Address: 13.107.213.19

Ubuntu WSL does not have such problem

ameshkov commented 3 years ago

Tbh I have no clue what could it be. Try recording tcpdump please, maybe there will be something useful.