WireGuard adalah protokol VPN modern yang lebih cepat, lebih simpel, dan lebih aman dibanding OpenVPN atau IPSec. Hanya ~4000 baris kode vs ~100000 OpenVPN.
apt install wireguard -ywg genkey | tee server_private.key | wg pubkey > server_public.key\nwg genkey | tee client_private.key | wg pubkey > client_public.key# /etc/wireguard/wg0.conf\n[Interface]\nAddress = 10.0.0.1/24\nListenPort = 51820\nPrivateKey = SERVER_PRIVATE_KEY\n\n[Peer]\nPublicKey = CLIENT_PUBLIC_KEY\nAllowedIPs = 10.0.0.2/32[Interface]\nPrivateKey = CLIENT_PRIVATE_KEY\nAddress = 10.0.0.2/24\nDNS = 1.1.1.1\n\n[Peer]\nPublicKey = SERVER_PUBLIC_KEY\nEndpoint = VPS_IP:51820\nAllowedIPs = 0.0.0.0/0systemctl enable wg-quick@wg0\nsystemctl start wg-quick@wg0WireGuard siap digunakan! Koneksi VPN yang cepat dengan latency minimal.