Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internet in WSL2 error when using mirrored network with firewall #11585

Closed
1 of 2 tasks
pengyusi opened this issue May 15, 2024 · 4 comments
Closed
1 of 2 tasks

Internet in WSL2 error when using mirrored network with firewall #11585

pengyusi opened this issue May 15, 2024 · 4 comments
Labels

Comments

@pengyusi
Copy link

Windows Version

10.0.22621.3447

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.146.1-2

Distro Version

Ubuntu 20.04

Other Software

Symantec Endpoint

Repro Steps

Since the win10 does not support mirrored network, and the Symantec Endpoint always refuses the connection between win host and wsl (as in other issues reported like #5382 ), I update my os to win11 and set the network to mirrored. But the network situation does not fixed. The problems:
in wsl2:

Server:         127.0.0.42
Address:        127.0.0.42#53

Non-authoritative answer:
www.baidu.com   canonical name = www.a.shifen.com.
Name:   www.a.shifen.com
Address: 180.101.50.242
Name:   www.a.shifen.com
Address: 180.101.50.188
Name:   www.a.shifen.com
Address: 240e:e9:6002:15c:0:ff:b015:146f
Name:   www.a.shifen.com
Address: 240e:e9:6002:15a:0:ff:b05c:1278

in win powershell:

  • nslookup get the same output
  • ping normal
  • ssh normal

network settings

  • wsl2
ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.37.71  netmask 255.255.255.0  broadcast 192.168.37.255
  • win PowerShell
ip addr  192.168.37.71
subnet mask 255.255.255.0
gateway 192.168.37.254

Expected Behavior

the SSH, RPC and CURL should work normally.
in NAT, the Symantec Endpoint blocked the TCP data between wsl and host, but when using mirrored network, there shouldn't be TCP connection, so how the firewall blocks the data and how can I fix it?

Actual Behavior

actual behaviors are like those mentioned above.
when I set HTTP proxy, the curl works, and configuring the SSH through HTTP proxy also allows the SSH but that's not the solution

Diagnostic Logs

No response

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@pengyusi
Copy link
Author

/question

Copy link

Diagnostic information
Found '/question', adding tag 'question'

@OneBlue
Copy link
Collaborator

OneBlue commented May 28, 2024

@pengyusi: The easiest way to transmit data between WSL and Windows would be to use the localhost relay. If you bind a port on either side, you can then simply connect to it via 127.0.0.1 on the other side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants