This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
technical:vpn:wireguard [2022/08/11 09:03] – 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 ===== | + | # Generate Keys |
+ | ``` | ||
+ | wg genkey | tee privatekey | wg pubkey > publickey | ||
+ | wg genpsk | ||
+ | ``` | ||
- | ===== Generate Keys ===== | + | # Config |
+ | ##Edit WireGuard Config | ||
+ | ``` | ||
+ | vim / | ||
+ | ``` | ||
- | ===== Config ===== | + | ## Add the Local Address/ |
+ | ``` | ||
+ | [Interface] | ||
+ | Address | ||
+ | PostUp | ||
+ | PostDown | ||
+ | ListenPort | ||
+ | PrivateKey | ||
- | ===== Startup ===== | + | [Peer] |
+ | PublicKey | ||
+ | AllowedIPs | ||
+ | Endpoint | ||
+ | PresharedKey | ||
+ | ``` | ||
- | ===== Shell Script ===== | + | # Startup |
+ | ``` | ||
+ | wg-quick up $interface | ||
+ | ``` | ||
+ | # Shell Script | ||
+ | </ | ||