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

wsl2 mirrored nmap filtered #11761

Open
1 of 2 tasks
lcarea opened this issue Jul 10, 2024 · 7 comments
Open
1 of 2 tasks

wsl2 mirrored nmap filtered #11761

lcarea opened this issue Jul 10, 2024 · 7 comments
Labels

Comments

@lcarea
Copy link

lcarea commented Jul 10, 2024

Windows Version

Windows11 23H2 22631.3810 X64

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

kali linux

Other Software

1、wsl2 use mirrored nmap port filtered
eg:
nmap -sV -v -p 80 192.168.0.1
PORT STATE SERVICE VERSION
80/tcp filtered http Microsoft IIS httpd 10.0
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

2、wsl2 no use mirrored nmap port open
eg:
nmap -sV -v -p 80 192.168.0.1
PORT STATE SERVICE VERSION
80/tcp open http Microsoft IIS httpd 10.0
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

Repro Steps

.wslconfig

# Settings apply across all Linux distros running on WSL 2
[wsl2]

# Limits VM memory to use no more than 4 GB, this can be set as whole numbers using GB or MB
memory=8GB

# Sets the VM to use two virtual processors
processors=8

[experimental]
autoMemoryReclaim=gradual # 开启自动回收内存,可在 gradual, dropcache, disabled 之间选择
networkingMode=mirrored # 开启镜像网络
dnsTunneling=true # 开启 DNS Tunneling
firewall=true # 开启 Windows 防火墙
autoProxy=true # 开启自动同步代理
sparseVhd=true # 开启自动释放 WSL2 虚拟硬盘空间
hostAddressLoopback=true

Expected Behavior

wsl2 use mirrored nmap port open
eg:
nmap -sV -v -p 80 192.168.0.1
PORT STATE SERVICE VERSION
80/tcp open http Microsoft IIS httpd 10.0
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

Actual Behavior

wsl2 use mirrored nmap port filtered
eg:
nmap -sV -v -p 80 192.168.0.1
PORT STATE SERVICE VERSION
80/tcp filtered http Microsoft IIS httpd 10.0
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

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.

@lcarea
Copy link
Author

lcarea commented Jul 15, 2024

/question

Copy link

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

@lcarea
Copy link
Author

lcarea commented Jul 15, 2024

预期:正常的WSL2 mirrored Nmap Open
image-20240715155155272

image-20240715155235752

非预期:不正常的WSL2 mirrored Nmap filtered

相同配置

nmap -sV -v -p 80 203.130.44.44
PORT   STATE SERVICE VERSION
80/tcp filtered  http    Microsoft IIS httpd 10.0

PS:防火墙关闭状态!

我该怎么做才能在WSL2使用镜像模式,nmap不会filtered

@lcarea
Copy link
Author

lcarea commented Jul 16, 2024

question

@lcarea
Copy link
Author

lcarea commented Jul 16, 2024

/question

Copy link

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

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

1 participant