Skip to content

DNS Server and port 53 #9095

@boan-jfm

Description

@boan-jfm

Version

Microsoft Windows [Version 10.0.19044.1766]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.4.72

Distro Version

Ubuntu 2204

Other Software

Dnsmasq - configured to listen on 0.0.0.0 interface or 127.0.0.1 - default port 53

Repro Steps

  1. Let dnsmasq listen on port 53 for dns lookups
  2. Try in WSL 2 to make nslookup example.org 127.0.0.1 and see the correct result
  3. Try in PowerShell to make nslookup example.org 127.0.0.1 - Server: UnKnown

If you run a netstat -nab in PowerShell

UDP    0.0.0.0:53             *:*
SharedAccess
[svchost.exe]

It seems like a service occupying port 53 on Windows when running WSL. I have tried with a Windows restart - and the SharedAccess seems to start with the WSL start up.

Expected Behavior

You should be able to run nslookup within Windows and not only in WSL 2.

Actual Behavior

dnsmasq runs fine in WSL 2, but can not be reached within the Windows environment

Diagnostic Logs

WSL

nslookup foo.test 127.0.0.1
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   foo.test
Address: 127.0.0.1

PowerShell

nslookup foo.test 127.0.0.1
Server:  UnKnown
Address:  127.0.0.1

*** UnKnown can't find foo.test: No response from server

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions