This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| technical:vpn:wireguard [2022/08/11 09:02] – jc | technical:vpn:wireguard [2024/12/14 09:37] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== WireGuard VPN ====== | ====== WireGuard VPN ====== | ||
| + | < | ||
| + | # Install | ||
| + | ``` | ||
| + | sudo pacman -S wireguard-tools | ||
| + | ``` | ||
| - | ===== Install WireGuard ===== | + | # Generate Keys |
| + | ``` | ||
| + | wg genkey | tee privatekey | wg pubkey > publickey | ||
| + | wg genpsk | ||
| + | ``` | ||
| - | ===== Generate | + | # Config |
| + | ## | ||
| + | ``` | ||
| + | vim / | ||
| + | ``` | ||
| - | ===== WireGuard Config ===== | + | ## Add the Local Address/ |
| + | ``` | ||
| + | [Interface] | ||
| + | Address | ||
| + | PostUp | ||
| + | PostDown | ||
| + | ListenPort | ||
| + | PrivateKey | ||
| - | ===== Enable WireGuard ===== | + | [Peer] |
| + | PublicKey | ||
| + | AllowedIPs | ||
| + | Endpoint | ||
| + | PresharedKey | ||
| + | ``` | ||
| - | ===== WireGuard Shell Script ===== | + | # Startup |
| + | ``` | ||
| + | wg-quick up $interface | ||
| + | ``` | ||
| + | # Shell Script | ||
| + | </ | ||