-
Notifications
You must be signed in to change notification settings - Fork 822
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
MacAddressSpoofing not working for WSL2 bridged adapter #8602
Comments
It is possible to change MAC address of the virtual NIC in another way. I do not know if it is possible with Set-VMNetworkAdapter. To change MAC address of WSL2 NIC, I removed the attached network endpoint and create a new one with different MAC address. Then attached it with WSL2 VM. I have shared the code in that thread. |
This issue is not about changing the MAC - it's about MacAddressSpoofing not working. I already provided some information how I stumbled upon this issue: I cannot set same MAC on both Ubuntu and nested VM. So what I want to achieve is unblocking other MAC addresses than default one - this is what I think MacAddressSpoofing option is for. |
Also run into this problem these days. I'm trying to set up my QEMU, which use a tap interface for its network, on WSL2. Appreantly, the packets from QEMU have a unique source MAC address. I managed to bridge the tap interface and eth0, but when I use wireshark to dump the traffic of eth0(on WSL2) and the traffic of vEthernet interface(on Windows) it just doesn't work. Only packets whose source MAC address is identical to eth0's can be captured on Windows. I have tried to set MACAddressSpoofing on the adapter but there's no luck. And adding another dummy adapter with tap MAC address to WSL switch in hope of fooling the adapter does not work as well. So I'm curious about how to pass a packet with arbitary source MAC address from WSL2 to Windows. I keep the WSL switch an internel switch so this problem may not be limited to an externel switch. By the way, This thread on Superuser give more details but it seems that no solution has been found. |
The thread on Superuser is mine - I tried to clarify the origin of the problem with nested VM networking and possibly find a workaround but it came out that the real problem is MAC filtering and the fact that the MAC spoofing doesn't work for WSL2 adapter. This is why I reported this issue. |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Version
Microsoft Windows [Version 10.0.19042.1766]
WSL Version
Kernel Version
5.10.16
Distro Version
Ubuntu-20.04
Other Software
Hyper-V Manager 10.0.19041.1
Repro Steps
Set type to "External" and choose ethernet adapter with static ip address set (e.g. 192.168.1.2)
SUCCESS
6. Change Ubuntu eth0 MAC address, e.g.:
FAIL
Expected Behavior
Since MacAddressSpoofing is enabled traffic should not be blocked after MAC change and ping should succeed.
Remarks:
Actual Behavior
Ping fails since all MAC addresses except default one are blocked.
The text was updated successfully, but these errors were encountered: