WEBVTT

1
00:00:00.300 --> 00:00:04.440
This WireGuard tunnel finished its handshake eighty seconds ago.

2
00:00:04.460 --> 00:00:06.960
Not one ping has made it through.

3
00:00:07.180 --> 00:00:09.960
A handshake is two small packets:

4
00:00:09.980 --> 00:00:12.280
148 bytes one way,

5
00:00:12.300 --> 00:00:13.560
92 back.

6
00:00:13.580 --> 00:00:17.000
It proves the keys match and that the path carried one

7
00:00:17.020 --> 00:00:18.520
small exchange.

8
00:00:18.540 --> 00:00:22.030
It says nothing about what happens to your data next.

9
00:00:22.250 --> 00:00:24.870
A real packet takes a longer road.

10
00:00:24.890 --> 00:00:27.190
The route table sends it into the tunnel,

11
00:00:27.210 --> 00:00:29.830
and AllowedIPs picks the peer.

12
00:00:29.850 --> 00:00:32.470
It crosses the network encrypted.

13
00:00:32.490 --> 00:00:34.710
The server checks where it came from,

14
00:00:34.730 --> 00:00:37.910
forwards it, passes it through its firewall,

15
00:00:37.930 --> 00:00:39.030
swaps the address,

16
00:00:39.050 --> 00:00:40.430
and sends it on.

17
00:00:40.650 --> 00:00:43.830
wg show transfer gives you four numbers,

18
00:00:43.850 --> 00:00:45.110
two on each end.

19
00:00:45.130 --> 00:00:47.270
On a healthy tunnel they pair up.

20
00:00:47.290 --> 00:00:48.150
In our test,

21
00:00:48.170 --> 00:00:49.350
to the byte.

22
00:00:49.580 --> 00:00:52.830
Leave the client out of the server's AllowedIPs,

23
00:00:52.850 --> 00:00:59.390
and the client sends 5,780 bytes while the server counts 148:

24
00:00:59.410 --> 00:01:01.950
the handshake, and nothing else.

25
00:01:01.980 --> 00:01:04.760
Make the client's AllowedIPs too narrow,

26
00:01:04.780 --> 00:01:07.410
and the traffic never enters the tunnel.

27
00:01:07.630 --> 00:01:09.050
Switch off forwarding,

28
00:01:09.070 --> 00:01:10.490
drop the NAT rule,

29
00:01:10.510 --> 00:01:12.890
or set the forward policy to drop,

30
00:01:12.910 --> 00:01:15.930
and all three give the same four numbers.

31
00:01:15.950 --> 00:01:18.170
The tunnel delivered everything.

32
00:01:18.190 --> 00:01:21.740
Only the server's own counters tell the three apart.

33
00:01:21.960 --> 00:01:25.860
A path that drops large packets is the odd one out.

34
00:01:25.880 --> 00:01:27.620
Small pings pass,

35
00:01:27.640 --> 00:01:29.300
the download gets nothing,

36
00:01:29.320 --> 00:01:31.540
and the server keeps resending.

37
00:01:31.560 --> 00:01:34.650
It also had the freshest handshake of the lot.

38
00:01:34.870 --> 00:01:37.650
If the numbers look healthy and only names fail,

39
00:01:37.670 --> 00:01:39.350
look at DNS.

40
00:01:39.580 --> 00:01:43.000
One of our own tunnels kept handshaking for forty hours with

41
00:01:43.020 --> 00:01:44.440
no user data.

42
00:01:44.450 --> 00:01:47.720
A short one-way outage made our client give up on an

43
00:01:47.730 --> 00:01:51.160
extra key exchange it runs after the handshake,

44
00:01:51.170 --> 00:01:52.840
and without that exchange,

45
00:01:52.860 --> 00:01:55.000
it held back user data.

46
00:01:55.020 --> 00:01:59.230
WireGuard kept opening sessions about every three minutes.

47
00:01:59.250 --> 00:02:00.670
The server knew:

48
00:02:00.690 --> 00:02:02.940
its last data was a day old.

49
00:02:03.160 --> 00:02:05.060
So don't stop at the handshake.

50
00:02:05.080 --> 00:02:07.170
Read the bytes on both ends.
