Live data from Hacker News

Linux under WSL2 can be leaking

mullvad.net

41–50 of 194 posts

Re: Linux under WSL2 can be leaking

#42
Docker on Windows can run on WSL2 backend as well. So I assume this would also apply to Docker traffic too.

Other interesting note, Docker Windows does some funky stuff with firewalls too. It puts and any/any exception in the firewall when you install it [1]. So may also be important to know with VPN stuff.

[1] https://twitter.com/richturn_ms/status/1270766764356366336

Re: Linux under WSL2 can be leaking

#43

This is the exact reason I didn't try running weird VPN configs like this. The reliable way is to run Linux inside a VirtualBox and have it connected to VPN on its own. Currently, I run Linux on a Xen domU and configure VPN client inside the guest. PS: I don't want all my traffic to go through VPN. Especially things like Netflix or Youtube where VPNs are blocked (and VPN BW is lower anyway).

You can set up a docker vpn client as well

I tried docker. "Always Require VPN" didn't work with docker.

Re: Linux under WSL2 can be leaking

#44

Earlier quoted context omitted.

Did you consider the average pollution of bitcoin transactions?

Good question. OTOH, did anyone ever consider the average pollution of the banking system? 10.000th of banks, 200+ central banks, BIS, IMF, ECB, etc, etc. Millions of employees, millions of desktops & servers, day-in-day out. Anyone with a link to a guestimate?

There's no way that a single $6 credit card transaction uses as much energy as sending $6 worth of bitcoin, which is the relevant measure.

Re: Linux under WSL2 can be leaking

#45

Earlier quoted context omitted.

Did you consider the average pollution of bitcoin transactions?

Good question. OTOH, did anyone ever consider the average pollution of the banking system? 10.000th of banks, 200+ central banks, BIS, IMF, ECB, etc, etc. Millions of employees, millions of desktops & servers, day-in-day out. Anyone with a link to a guestimate?

The Bitcoin network allegedly uses the amount of energy as the whole country of Denmark. This includes heavy industries like aluminum smelting that more or less use as much power as they are allowed to.

A Bitcoin transaction uses about 1,005 kWh, while 100,000 VISA transactions use 169 kWh, according to https://www.statista.com/statistics/881541/bitcoin-energy-co...

Re: Linux under WSL2 can be leaking

#46
post #36

Earlier quoted context omitted.

>It's strange tcpdump doesn't run though as WSL2 is running a real kernel. It works just fine. Just tested it

Try dumping UDP packets from the host to the WSL machine...

The WSL machine is a Hyper-V VM. Why would you expect the default configuration to be able to sniff traffic from the host operating system? That would be a massive security hole.

Re: Linux under WSL2 can be leaking

#47
post #39
post #11

Using WSL should be a very last resort anyway. Just use Linux straight on your hardware if you have a choice and ditch Windows.

Why? In my opinion Linux desktop environments are terrible compared to Windows. How's the display scaling these days? Is it still a better experience to run a 4k monitor at a lower resolution? What's the Nvidia driver situation? Still janky because their drivers are doing their own thing?

I have not experienced any NVIDIA driver related issues for over a decade. I cannot comment on the rest.

I think there are great desktop environments and window managers for Linux.

Re: Linux under WSL2 can be leaking

#48

Earlier quoted context omitted.

Good question. OTOH, did anyone ever consider the average pollution of the banking system? 10.000th of banks, 200+ central banks, BIS, IMF, ECB, etc, etc. Millions of employees, millions of desktops & servers, day-in-day out. Anyone with a link to a guestimate?

There's no way that a single $6 credit card transaction uses as much energy as sending $6 worth of bitcoin, which is the relevant measure.

Yea but a whole fraud department of humans emits a ton of carbon. There's no way the banking and finance industry doesn't compete emissions wise with bitcoin.

Re: Linux under WSL2 can be leaking

#49
post #11

Using WSL should be a very last resort anyway. Just use Linux straight on your hardware if you have a choice and ditch Windows.

WSL is actually really good. To me, it gives you the best of both worlds. Linux for dev stuff, Windows for GUI and games. And its actual Linux, so I am dev'ing a little closer to prod than those on Macs. But that's less of a factor now everything is in Docker and we are all using the same containers. I also feel I have a superior Docker (runs on WSL2) experience to them, better interface and much better battery life. Its of course all personal opinion, but I have no desire or need to move off Windows.

Re: Linux under WSL2 can be leaking

#50

The title is wrong. The VPN traffic does NOT leak. What leaks is the traffic that the VPN software tries to block when the VPN connection is not active. Mullvad uses Windows Firewall to block all internet access if VPN is not active (if the user configured so) and WSL2 bypasses this by not going through Windows Firewall. When the VPN is active, WSL2 traffic IS tunneled through the VPN. UPD: The solution may be to hav…

A good reminder that you really want proxying done on a separate device (router, Raspberry Pi, etc) physically between the endpoint and the internet.
Post reply on HN