Labs / Sealed Lines / GRE, VPN & IPsec

Lab 2 of 3 · GRE, VPN & IPsec

VPN: a private tunnel across a hostile network

Reach a closed office over WireGuard, and stop a DNS leak.

Open this lab Pro 7 steps

The idea

A VPN gives a laptop on a hostile network an encrypted tunnel to a server it trusts: what you route into it is hidden, the rest is not. In a café whose gateway, attackerProxy, records everything, splitLaptop and fullLaptop tunnel to vpnGateway, the office's one door; the phone has no VPN.

The attacker gets only noise
The attacker gets only noise
The leak and the seal
The leak and the seal

Steps

  1. The office has no door but the VPN

    A VPN only matters if the office cannot be reached without it, so check that first. The office's intranet sits on a network nobody routes to. phone, in the café, has no VPN.

    phone:~# ping -c 1 -W 2 intranet.lab
  2. A split tunnel reaches the office

    A tunnel that carries only the office's traffic leaves the rest as it was: cheap, but not private. splitLaptop runs a VPN: WireGuard, built into Linux, with a tunnel card named wg0. A split tunnel sends only some destinations into it. Its routing table says which.

    splitLaptop:~# ip route
    splitLaptop:~# curl -s -m 10 http://intranet.lab/
    splitLaptop:~# traceroute -q1 -w2 intranet.lab

Pro

5 more steps in the app

  1. What the VPN server sees
  2. A split tunnel leaves everything else exposed
  3. A full tunnel gives the attacker only noise
  4. The DNS leak
  5. When the VPN server goes away
Get Pro

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Start with a free account: Google or email, no card.

Open this lab