-
Notifications
You must be signed in to change notification settings - Fork 826
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: ifconfig not showing all network connections #4915
Comments
If this is WSL2 (which it appears to be) this is for all intents by-design. WSL2 has its own Real Linux™ network stack inside a VM, and a virtual Ethernet device. Contrast WSL1 which took the approach of attempting to present the Windows network stack inside Linux. |
I understand it has a different architecture, but i hoped it would still have the same functionality. |
If you believe you've lost functionality vs. WSL1, that would make for a reasonable submission under a different cover including use case details etc. [Notwithstanding already identified WSL2 networking gaps notably glaring #4150, localhost transparency, and variations thereof.] It is possible (probable even), that the hole in functionality for a given specific use case can be plugged.
That is variation #874 (message).
It is, as I understand it anyway, a design goal of WSL2 to provide WSL1 functionality and then some, to the extent that is achievable and notwithstanding the various trade-offs thereof (landing zone "I wish WSL1 turned out better" #4022). You were not able to manipulate iptables(8) or the networking device layer in WSL1. There is no "things like this are no longer possible" at least in that narrow respect. You were not able to do BPF aka perennial #1349 in WSL1. Now you can. WSL2 has It would make an interesting masters thesis (or at least a thought experiment) to identify with specificity your ask (nevermind a describing an implementation). It isn't, paraphrasing, " |
I have added the use case to initial post. |
For context, what was the crux of the WSL bash script that added the route? It doesn't need to be long or detailed, just the part doing the heavy lifting. It can even be in the abstract (the commands run) not a copy-paste of the real code. |
It runs a route -n with a grep to find the VPN interface (this is essentially the bit that is failing now as WSL2 has no sight of it, so it presented as the same issue as we once had in WSL1 which I linked to) It then calls into our cloud tooling to get a list of IPs from AWS and iterates and adds a route via sudo route add -host $INSTANCE -interface $GATEWAY |
[retake] Assuming this is the case, on WSL2, interop with Windows |
Hello, |
The use case is vlan, so they are related. Thank-you for the reference. The gist of the original poster's ask was:
Which is very similar to #2685, for WSL1. In WSL1 the non-physical network interfaces were filtered outright (by-design). So this ask is pretty much "where did they go?", but in the context of WSL2. WSL2 has its own virtual |
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! |
This is almost identical to the issue that was found in original WSL at:
#2685
Version 2004, Build 19041.84
This is a SonicWall VPN through Win10 VPN.
Output of sudo cat /proc/net/dev
output of ifconfig
A full ipconfig shows
Our use case for needing this is as follows.
We have a huge number of servers deployed to the cloud (AWS). Some are pretty static, some are very transient.
These are accessible only if routing over our corporate VPN.
We connect to the VPN typically using sonicwall netextender in Windows but can also use native Windows 10 VPN.
We have a bunch of tooling to support deployment of these cloud instances written in in bash. Part of this tooling is a script to identify the public IPs of the cloud instances from aws, identify the gateway IP of the VPN, and add a route. This isn't just so that WSL can hit the node, it's so Windows can see the nodes too.
In WSL1 this allowed our Windows 10 host OS to access these AWS instances over HTTPS in a browser. Allowed our mssql tools to connect to the cloud SQL instances, allowed our oracle sql developer tooling to connect to Oracle RDBS, and so on.
It's not a persistent route. The routes vanish when we disconnect from the VPN, and that's absolutely fine.
The text was updated successfully, but these errors were encountered: