Linux Format

Tor, Proxies, VPNs

Make the spies cry into their vodka martinis by encrypting and rerouting our data before it passes through untrusted machines.

-

So, you’re worried about your ISP snooping on you or blocking content. Then one solution is to stop using the Internet. Another is to use a proxy or virtual private network (VPN). The principle is the same for both here: from your home connection you connect to your destinatio­n via an intermedia­ry server.

If an admin at your ISP were only looking at your network connection­s, then they would only see you connecting to this intermedia­ry. However, sniffing traffic off the wire is cheap (in the UK ISPs can recover costs from the ( taxpayer–Ed) government) and easy, so one must assume a stronger adversary. A simple HTTP proxy won’t encrypt any data, and will even forward your IP address to the destinatio­n via the X-Forwarded-For header. That’s not so private, but there are lower level proxies, such as SOCKS proxies that act more transparen­tly. The SOCKS protocol itself contains no encryption though, so if you want privacy the encryption has to be applied by the applicatio­n, for example using protocols such as SSH or HTTPS. SOCKS proxies originated as a routing tool, not a privacy one, so this shouldn’t really be looked upon as a limitation. See the box ( below) for guidance on setting up a perfectly servicable SOCKS proxy using SSH. VPNs, though, add the encryption for free, so all your ISP sees is that you’re connecting to a server and receiving a lot of TLS-encrypted packets from there. Great, problem solved.

Well, not really. VPNs have become popular in the five years since the Snowden revelation­s. VPN providers, though, can see exactly what’s going through their servers. They’re also subject to whatever laws apply in their jurisdicti­ons, so a VPN provider in the UK would be classed as a communicat­ions provider, and as such could be required to start logging individual (or all) user’s connection­s. Providers may not, as policy, keep any logs, but the threat of legal action could persuade them to silently make exceptions to this policy.

There are also a number of unscrupulo­us VPN providers out there, and given the terrible link-spamming you’ll bear witness to if you do any research, it’s hard to know who can be trusted. They say if you’re not paying for a service, then you’re the product, and ne’er did a truer word apply than in the case of Hola, which provided a free “VPN” via a browser plugin. Users could select which country they wanted to appear be browsing from, so the service became particular­ly popular with users wanting to bypass geoblocks on streaming sites. Many users were unaware of one small detail, which is that Hola operated a peer-to-peer architectu­re, so the VPNs users were connecting to were in fact just other Hola customers.

Furthermor­e, in 2014 users became co-opted into a side project of Hola’s parent company, spookily named Luminati. This paid service used the freeloader­s as exit nodes, effectivel­y reselling their bandwidth and exposing them to the legal consequenc­es of anything that said bandwidth was used for. Hola still operates to this day, but is more open about how its peer-to-peer infrastruc­ture operates, and take steps to protect users’ connection­s from abuse.

Most commercial VPNs use the OpenVPN protocol, which is portable, can traverse NAT gateways and doesn’t require awful (or Windows-only) client programs. The encrypting work is offloaded to the ubiquitous OpenSSL library. Configurat­ion can be done from the NetworkMan­ager GUI, and varies from provider to provider. Some even provide Linux-specific instructio­ns, but in general won’t involve much more than downloadin­g a certificat­e, pointing NetworkMan­ager at a server and supplying a username and password.

All your Internet traffic is then routed, typically via a TUN device, to the VPN server. DNS requests (those which resolve

linuxforma­t.com to 80.244.178.150 for example) should be forwarded too, so your ISP can’t see which sites you’re visiting. Typically VPNs provide their own DNS services, and will push those to your OpenVPN client. But thanks to many levels of DNS-caching, this may not work. Since DNS requests aren’t encrypted, and so websites can see where who resolved their hostname for you, this is a problem. Websites such as dnsleak.

com and ipleak.net can diagnose these issues. Avoiding your ISPs DNS server is easy and since much ISP-level blocking is done at the DNS level this trick has proven popular in the UK. There are plenty of public DNS providers (Google’s 8.8.8.8 and 8.8.4.4 are popular) which you can get NetworkMan­ager or your router to use. But really, you want to ensure DNS requests are tunnelled over the VPN and you should be wary of where they’re going after that. If you’re accessing Google services over the same connection that accesses their DNS, even if both are done over a VPN, then you’re pretty much telling them all the websites you’re visiting. In general, it’s a bad idea to access any service connected with your identity over a VPN, at least if you’re also using that VPN to conceal your identity.

Go undercover with Tor

The Tor network is your best hope of being anonymous on the Internet. It’s built on the principle of onion routing, in which traffic is wrapped in a new layer of encryption with each network hop. Tor was developed first at the US Naval Research Laboratory and later by DARPA (the Defense Advanced Research Projects Agency, the very same that founded ARPANET, the basis for today’s Internet). Since DARPA is part of the US Department of Defense, there are a fair number of conspiracy theories circulatin­g about its trustworth­iness. However, the Tor Project has a variety of funding sources, and it’s trying to move away from government ones. You can contribute too, either financiall­y or by running your own Tor node. Running an exit node does expose you to some risk, but you can happily run a non-exit relay or bridge node.

There are two ways you can use the Tor network, either to access Tor (.onion) sites directly, or as an intermedia­ry to access convention­al ("clearnet") sites (or other hosts – any kind of traffic (for example, SSH, VPN, FTP) can be tunnelled over Tor). In the second case the exit node, the final Tor node that routes your traffic to the clearnet, knows what you’re accessing. None of the preceding nodes do because all that routing informatio­n is wrapped in a layer of encryption. The exit relay doesn’t know your IP address though – it only knows the address of the preceding Tor node, again, because the circuit routing details are encrypted.

Still, a malicious exit node is a concern. Traffic sent over HTTPS remains encrypted when it leaves the exit relay, but other traffic is not. By inspecting this traffic, and cross referencin­g with metadata from the encrypted connection, it’s possible that deductions can be made about the user. For example if a user visits http://linuxforma­t.com using a browser which contains locale info, say en_GB , and that user also visits a clearnet site offering replacemen­t parts for netbooks circa 2008, then the exit node could reasonably infer that user is Jonni because no one else in the UK cares about broken, old netbooks and putting Linux on them. That’s a tenuous example, but you get the idea. More concerning is a traffic correlatio­n attack, sometimes called a traffic confirmati­on attack, in which traffic is tagged by a malicious entry note and caught on its egress by a malicious exit node.

There are malicious sites both on and off the Tor network, and those wanting to stay under the radar should take no chances. In the film TheLivesof­Others, the protagonis­t uses a small typewriter smuggled into the country, since those sold within the country all have to be registered and can be traced by the Stasi. Web browsers can be traced too, and browser fingerprin­ting doesn’t need secret police to maintain a central registry. Plenty of browsers, thanks to the OS they’re installed on, the way they render fonts and many other variables, uniquely identify the user. Any third-party ad provider has access to this informatio­n, so in this case it seems sensible to have as homogenous browser settings as possible, by using the Tor BrowserBun­dle for example. See https://panopticli­ck.eff.org for more informatio­n.

“VPNs have become popular in the five years since the Snowden revelation­s…”

 ??  ??
 ??  ?? You’ll find several thousand guides on the “best” VPNs. But the curse of link sponsorshi­p has infiltrate­d deep, and many of these can’t be trusted.
You’ll find several thousand guides on the “best” VPNs. But the curse of link sponsorshi­p has infiltrate­d deep, and many of these can’t be trusted.
 ??  ?? Commercial VPNs are easy to set up from NetworkMan­ager. Some will even provide a .ovpn file, which will import all settings without hassle.
Commercial VPNs are easy to set up from NetworkMan­ager. Some will even provide a .ovpn file, which will import all settings without hassle.

Newspapers in English

Newspapers from Australia