Van toepassing op: LifeinCloud Cloud VPS • Ubuntu 22.04 LTS

Overzicht

WireGuard is een snel, modern VPN-protocol dat eenvoudig te configureren is. Hoewel LifeinCloud een 1-klik WireGuard image aanbiedt, laat deze handleiding zien hoe je het handmatig installeert.

Vereisten

  • LifeinCloud VPS met Ubuntu 22.04.
  • Root SSH-toegang.

Stap 1 — Update de VPS

ssh root@YOUR_SERVER_IP
apt update && apt upgrade -y

Stap 2 — Installeer WireGuard

apt install -y wireguard qrencode

Stap 3 — Genereer sleutels

umask 077
wg genkey | tee /etc/wireguard/privatekey | wg pubkey > /etc/wireguard/publickey

Stap 4 — Maak configuratiebestand aan

nano /etc/wireguard/wg0.conf
[Interface]
Address = 10.0.0.1/24
PrivateKey = (inhoud van /etc/wireguard/privatekey)
ListenPort = 51820
SaveConfig = true

[Peer]
PublicKey = CLIENT_PUBLIC_KEY
AllowedIPs = 10.0.0.2/32

Stap 5 — Activeer en start WireGuard

systemctl enable wg-quick@wg0
systemctl start wg-quick@wg0

Stap 6 — Firewallregels

ufw allow 51820/udp
Opmerking: Om handmatige installatie te vermijden, kun je het 1-klik WireGuard VPN image implementeren vanuit het LifeinCloud-controlepaneel.
Was dit antwoord nuttig? 0 gebruikers vonden dit artikel nuttig (0 Stemmen)