Wren Linux

wren-linux / docs / vpn-before-tor.md (as plain text)

A VPN before Tor: keeping your records away from your ISP

Your internet provider knows your name and address, and it carries everything you send. In the United States it can be made to hand over what it knows, and in some cases forbidden to tell you. This page gives that history, then explains one way to reduce what your provider has to hand over: Mullvad VPN, with a Tor bridge and Whonix inside it.

The Tor Project and Whonix don't generally recommend adding a VPN to Tor, and this page says why. For this one concern, your provider's records, it can still make sense. It isn't legal advice. If you're in real legal danger, talk to a lawyer: the EFF is one place to ask.

What has happened in the US

A small ISP and an 11-year gag. In 2004 the FBI sent Nicholas Merrill, who ran a small New York provider called Calyx, a National Security Letter: a demand that needs no judge's signature. It asked about one customer, including addresses, phone numbers, screen names, billing records, email addresses, and location data from cell towers for their calls. Merrill fought it in court, and the FBI later dropped its demand, but the gag stayed. He could say he had received the letter only in 2010, and a court lifted the gag in full only in 2015.

A secret room at AT&T. In 2006 Mark Klein, a former AT&T technician, came forward with documents showing AT&T copying internet traffic into a room in San Francisco that was controlled by the NSA. The EFF sued AT&T for its customers. In 2008 Congress passed the FISA Amendments Act, which gave the phone companies retroactive immunity, and the case was dismissed in 2009 because of it. The Supreme Court declined to hear it in 2012. So a judge never ruled on what AT&T had done.

Every call record at Verizon. In 2013 a leak published a secret court order dated April 25 of that year. It told Verizon Business Network Services to give the NSA its records of calls within the US and between the US and abroad, "on an ongoing daily basis". These were phone records, not internet ones, and the order left out what was said and the customer's name. It also said that "no person shall disclose to any other person that the FBI or NSA has sought or obtained tangible things under this Order", apart from a few exceptions such as a lawyer. Only the leak made it public. In 2015 a federal appeals court found that the law cited didn't authorize that bulk collection, and the USA Freedom Act replaced it with requests tied to a specific target.

What the law allows today

These are the main US tools, in brief, and each has more conditions than fit here:

ToolWho decidesWhat the provider givesCan it be kept secret?
Subpoena (18 USC 2703)No judge needed for an administrative or grand jury subpoenaYour name and address, times and lengths of sessions, your temporary network addresses, how you paySometimes, by a separate court order
Preservation request (2703(f))The government asksNothing yet: it must keep what it has for 90 days, and that can be renewedOften not told to you
Pen register order (18 USC 3123)A judge, on a lawyer's statement that it is relevant to an investigationFrom then on, who your connections go to, not their content, for up to 60 days at a time, renewableYes: the order is sealed and the provider may not reveal it
National Security Letter (18 USC 2709)A senior FBI official, with no judgeSubscriber information, toll billing records, and transaction recordsYes, if the FBI certifies a listed harm. A court can review it

Most providers aren't villains in this. They must obey, and you may never learn that they did. That is why it helps to reduce what they have in the first place.

What each party sees

WhoWithout a VPNWith a VPN
Your ISPYour name, when you're online, how much data moves, the address of your bridge, and where the rest of this computer connectsYour name, when you're online, how much data moves, and the address of one Mullvad server
MullvadNothingYour home address while connected, your bridge's address, how much data moves, and where the rest of this computer connects
Your bridgeYour home address, and that you use TorThe Mullvad server's address, and that a Tor user connected
Sites you visit in WhonixA Tor exit, not youA Tor exit, not you

The VPN wraps all of this computer's traffic: updates, ordinary browsing and Whonix alike. That wider cover is probably its biggest benefit if your provider is your concern. Webtunnel alone already makes your Tor connection look like ordinary web traffic, and secure DNS hides your name lookups, but neither covers the rest. Site names often still show at the start of ordinary connections, for example.

What it doesn't do

Why Mullvad, and what you'd be trusting

Other VPNs may suit you too. Mullvad is what Wren Linux installs (wrenctl install mullvad-vpn).

What the Tor Project and Whonix say

The Tor Project warns that a VPN can "reduce anonymity or break Tor's protections if not configured correctly", and doesn't generally recommend one unless you can configure both without compromising your privacy. They also offer bridges for hiding Tor from your network, which is what webtunnel does.

Whonix treats a VPN before Tor as optional and community-supported. It warns you to understand the risks, and that a VPN on the host can drop and may not fail closed: when it drops, traffic goes out directly unless something stops it. That is the reason for lockdown mode below.

So this page doesn't disagree with them about anonymity. It answers a narrower question.

Do you need it?

What worries youWhat helps
Your ISP knowing you use TorWebtunnel already covers much of this
A bridge operator learning your addressA VPN really helps
Your ISP's records of everything this computer doesA VPN really helps
Being found by a powerful adversaryA VPN changes little. Your habits matter most

How to set it up on Wren Linux

wrenctl install mullvad-vpn
mullvad account login 1234123412341234    your own account number
mullvad relay set location se             one country and stay there (se = Sweden)
mullvad lockdown-mode set on              no internet at all while the VPN is off
mullvad auto-connect set on               connect whenever the laptop starts
mullvad connect
mullvad status                            it should say Connected
whonix

Why it should work

On Wren Linux the Gateway's network runs through passt, an ordinary program on this computer, and its connections leave the way any other program's do. So they go through the VPN, and lockdown mode should block them when the VPN is down. A bridge that has to look up names does that through this computer's resolver.

Not tested by Wren Linux: that reasoning comes from how the network is built. The test suite doesn't try Whonix through Mullvad, and it needs a real account. You can check it yourself. Install tcpdump, start Whonix, and watch your real network card (ip route names it after dev, and mullvad status names the server's address):

sudo tcpdump -ni YOUR-CARD 'ip and not host MULLVAD-SERVER-ADDRESS'

A few lines to your own router are normal. Connections to your bridge's address or to anywhere else on the internet mean something is leaving outside the tunnel, so stop and find out why before you rely on this.

Sources