Live data from Hacker News

Linux under WSL2 can be leaking

mullvad.net

51–60 of 194 posts

Re: Linux under WSL2 can be leaking

#51
post #38

Why would someone run a VPN client on Linux under Windows, anyway, as opposed to just running it on Windows?

They are running it on Windows. It attempts to deny all outbound traffic if the VPN is not connected, but the WSL2 traffic does not follow that rule and gets out anyways.

Re: Linux under WSL2 can be leaking

#52

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).

WSL2 _is_ Linux inside a VM that's a peer of Windows. Having it connect to VPN on its own is _exactly_ what you have to do.

Re: Linux under WSL2 can be leaking

#53

A bit off topic, but this sort of transparency is why I don't mind paying $6 / mo for a vpn when mullvad's competitors are much cheaper. Their wireguard support is great, and their speeds are much faster than what I got through openVpn on pia.

I love everything about Mullvad except their device limit, which is unfortunately a deal breaker for me. 5 is completely inadequate for my use cases.

Re: Linux under WSL2 can be leaking

#54

Earlier quoted context omitted.

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.

Fraud departments provide a pretty useful service to consumers. The existing finance system is so much larger than the Bitcoin economy that it's no surprise if they, in total, rival Bitcoin in energy intensity. It processes orders of magnitude more transactions and provides other services that people use that have no Bitcoin equivalents.

This isn't a defense of the modern financial system, which is arguably a trash fire for plenty of reasons, but of course it's fairly energy intensive. It's massive. If it were replaced entirely by Bitcoin, it would be even more intensive.

Re: Linux under WSL2 can be leaking

#55
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.…

One reason to move off of Windows would be running graphical Linux apps. But that'll change soon.

Re: Linux under WSL2 can be leaking

#56
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?

Because in my opinion Windows is terrible :) For many reasons.

Linux users don't use Nvidia if they are interested in the modern desktop use case. That's a well known factor. If someone migrates to Linux using Nvidia, chances are high they'll change it to AMD on the next GPU upgrade.

Re: Linux under WSL2 can be leaking

#57

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.

1000 times this. See https://mullvad.net/en/help/openwrt-routers-and-mullvad-vpn/ for a relevant guide, see under the "Add a kill switch" for the equivalent functionality.

Re: Linux under WSL2 can be leaking

#58
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.…

Personally I don't see any benefit that WSL can offer that regular Linux can't. But I don't have any interest in Windows, so your case might differ.

Re: Linux under WSL2 can be leaking

#59

Earlier quoted context omitted.

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.

>There's no way the banking and finance industry doesn't compete emissions wise with bitcoin

not on a per transaction basis, which is the only relevant measure because the banking system supports a lot more people than bitcoin does.

A single bitcoin transaction uses 610.20 kWh right now, which is comparable to the energy consumption of an average US household over 20 days.[1]

Also for a comparison of scope, Tenpay, Tencents payment service processes about 1.2 billion transactions per day, Bitcoin does about 300k. If all financial transactions conducted in China alone would consume the amount of energy that a bitcoin transaction does, it would roughly eclipse the energy the country consumes in a year, in one day.

[1]https://digiconomist.net/bitcoin-energy-consumption/

Re: Linux under WSL2 can be leaking

#60
If you run your VPN tunnel on the same machine that is emitting your super-serious must-be-tunneled traffic, you are always just one configuration mishap or even software exploit (if you happen to be a Firefox Tor browser user) away from revealing your real connection.
Post reply on HN