Open colemar opened 3 months ago
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.
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!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
WSL logs WslLogs-2024-05-29_23-44-06.zip
The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.
Alternative workaround explanation: https://github.com/colemar/Win10WSL2UbuntuExternalIP/blob/main/README.md
Is your feature request related to a problem? Please describe. Cannot tell WSL2 to leave eth0 alone, that is don't set IP address, mask, routes.
Describe the solution you'd like Some setting in .wslconfig like:
networkingMode = noip
Describe alternatives you've considered Add this to /etc/wsl.conf
Why? Because being unable to make
networkingMode = bridged
work, I resorted to this solution:sudo -i
vi /usr/lib/systemd/network/wsl_external.network
vi /etc/wsl.conf
echo "nameserver 192.168.0.1" > /etc/resolv.conf
systemctl enable systemd-networkd
systemctl enable systemd-resolved
wsl --shutdown
ip addr
shows that eth0 has two ip addresses: 172.x.x.x.x and 192.168.0.x (the first I believe is related to NAT)ip route
shows two default routesAdditional context WSL version: 2.1.5.0 Kernel version: 5.15.146.1-2 WSLg version: 1.0.60 MSRDC version: 1.2.5105 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.4412