WireGuard
WireGuard is a modern, simple and fast VPN protocol that uses state-of-the-art cryptography and a small codebase.
Legal & ethical use. Use this tool only on systems, networks and data that you own or have explicit written permission to test. Unauthorised access or scanning can break computer-misuse laws (for example Pakistan's Prevention of Electronic Crimes Act, 2016, and equivalents elsewhere). Practise in your own lab or in authorised environments such as CTFs.
What it is used for
- Create a private tunnel to your home or lab network
- Secure traffic on untrusted Wi-Fi to a server you control
Key features
- Small, auditable codebase
- Public-key based peers
- Kernel integration on Linux
Installation
Install from your OS package source; see wireguard.com/install.
Beginner usage guide
Generate a key pair on each peer, write a minimal configuration with the peer's public key and bring the interface up.
Example commands
Run these only against your own lab or authorised targets. Placeholder addresses such as 192.0.2.x are documentation ranges.
Generate a private key
wg genkeyPrints a private key; keep it secret. Derive the public key with `wg pubkey`.
References
Source verification
Last reviewed: 2026-10-27
Links checked over HTTP: 2026-10-27 07:51 UTC — official: 200, docs: 200, repo: 200
Commands were written from the official documentation and have not been executed on this site; test them in your lab.
