Tom's wiki

VPN

Virtual Private Network. An overlay network with additional encryption.

Use cases:

VPN server is a host that routes traffic from other hosts outside the VPN (e.g. to the internet). It is basically a proxy server with additional encryption.

Cons of using VPN services:

Protocols

Comparison: https://www.ivpn.net/pptp-vs-ipsec-ikev2-vs-openvpn-vs-wireguard

WireGuard

https://www.wireguard.com

A modern, performance-focused VPN protocol that uses UDP.

✏️ Note
The protocol does not cover key generation/distribution/revocation.

Setup

Guides:

💡 Hint
The wg and wg-quick manpages are also worth reading.

Config

Default location: /etc/wireguard/wg0.conf

A host is exposed internally via its Address (virtual network) and externally via its Endpoint (physical network). The AllowedIPs parameter defines what traffic should be tunneled. Use 0.0.0.0/0 to tunnel all traffic.

The wg-quick tool automatically changes the DNS servers to those specified in the config on up and resets them back on down. The possibility of DNS leaks depends on how the VPN is configured:

💡 Hint
Use https://browserleaks.com and https://www.dnsleaktest.com to detect leaks.