Kişisel bir WireGuard VPN, sunucu, anahtarlar ve loglar tamamen senin demektir. Bu, elle yapılandırma rehberidir; ticari VPN'lere karşı ödünleşimler, tek komutlu wg-easy yolu ve DPI uyarısı için WireGuard'ı kendin barındır ve VPN için VPS kullanım senaryosuna bak. Bir ayrılmış IP planına ihtiyacın var — WireGuard bir gelen UDP portunda dinler.
1. WireGuard'ı kur ve sunucu anahtarlarını yap
apt update && apt install -y wireguard
wg genkey | tee /etc/wireguard/server.key | wg pubkey > /etc/wireguard/server.pub
chmod 600 /etc/wireguard/server.key
2. Sunucu yapılandırmasını yaz
# /etc/wireguard/wg0.conf
[Interface]
Address = 10.8.0.1/24
ListenPort = 51820
PrivateKey = <contents of /etc/wireguard/server.key>
PostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer] # your phone/laptop
PublicKey = <client public key — see step 4>
AllowedIPs = 10.8.0.2/32
3. Yönlendirmeyi aç ve başlat
sysctl -w net.ipv4.ip_forward=1
echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
ufw allow 51820/udp
systemctl enable --now wg-quick@wg0
wg show
4. Bir istemci anahtarı üret ve bağlan
İstemcide (ya da sunucuda üretip taşı):
wg genkey | tee client.key | wg pubkey > client.pub
client.pub'ı yukarıdaki [Peer] bloğuna koy (sonra systemctl restart wg-quick@wg0) ve istemciye bu yapılandırmayı ver:
[Interface]
PrivateKey = <client.key>
Address = 10.8.0.2/32
DNS = 1.1.1.1
[Peer]
PublicKey = <server.pub>
Endpoint = YOUR.SERVER.IP:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25
Onu WireGuard uygulamasına aktar (mobilde qrencode -t ansiutf8 < client.conf ile bir QR en hızlısı), aç — ve kendi sunucun üzerinden yönleniyorsun.
Notlar
- DPI arkasında mı (İran/Çin/Rusya)? WireGuard parmak izi alınıp engellenir — bunun yerine VLESS + Reality kullan.
- Web arayüzü mü tercih edersin? Tek komutlu wg-easy yolu bunu QR kodlu bir yönetim paneliyle kurar.
Nano-IP (aylık 8$) fazlasıyla yeterli, ölçümsüz trafik, yaklaşık bir dakikada root, KYC yok, kripto ile ödeme.
Yorumlar
Henüz yorum yok. İlk olun.