Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

DI 2.12: Setting up a VPN client

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

80 minutes

The server is ready. Now Priya's laptop.

Last lesson, the IT team set up the college VPN server and gave it Priya's public key. But the server is only half the job.

Priya's own device needs a connection that points at the server, holds her private key and says which traffic goes through. Then she can work from home.

Key words

WordWhat it means
Networkcomputers and devices joined together so they can share data
VPN clientthe device or program at the user's end that makes the VPN connection
Endpointthe address and port of the VPN server that the client connects to
DNSa service that turns a name into an IP address
Packeta small piece of data sent over a network
FQDNfully qualified domain name, a full hostname such as vpn.college.example
IP addressthe number that identifies a device on a network
Handshakethe first exchange in which the two ends check each other's keys
Keepalivea small message sent now and then so the link stays open
Split tunnelsending only some traffic through the VPN and the rest straight to the internet
Private keythe half of a key pair that you keep secret

The cells students fill in are left blank in this preview.

By the end of this lesson

Note

I can set up a VPN client, point it at the server and choose what it may send through the tunnel.

Starter

Have a go

Starter

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Four things a client setting holds

  1. Create the connection: a small file holds the settings.
  2. Set the destination: the server's IP address or its FQDN, and its port.
  3. Set permissions: which traffic is allowed through the tunnel.
  4. Set conditions: for example keep the link alive, or connect only when asked.

Carry on in the lab

This lesson continues in the same lab. gwA is the client. The server gwB already has a config file and wg0 up, from the last lesson. If your lab was restarted, run that lesson's server steps again first.

Press Run on each command in order.

Give the server a name

Command
echo '203.0.113.2 vpn.college.example' | sudo tee /etc/netns/gwA/hosts

A command for the lesson’s lab terminal. It is shown here and not run.

Check that gwA can find the name

Command
sudo ip netns exec gwA getent hosts vpn.college.example

A command for the lesson’s lab terminal. It is shown here and not run.

The lesson goes on

19 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.