एक निजी WireGuard VPN का मतलब है सर्वर, कुंजियाँ और लॉग सब आपके। यह मैनुअल कॉन्फ़िग हाउ-टू है; वाणिज्यिक VPN की तुलना में समझौतों, एक-कमांड wg-easy रास्ते और DPI चेतावनी के लिए देखें WireGuard सेल्फ-होस्ट करना और VPN के लिए VPS उपयोग-केस। आपको एक डेडिकेटेड-IP प्लान चाहिए — WireGuard एक इनबाउंड UDP पोर्ट पर सुनता है।
1. WireGuard इंस्टॉल करें और सर्वर कुंजियाँ बनाएँ
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. सर्वर कॉन्फ़िग लिखें
# /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. फ़ॉरवर्डिंग चालू करें और शुरू करें
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. एक क्लाइंट कुंजी बनाएँ और जुड़ें
क्लाइंट पर (या सर्वर पर बनाकर उसे ले जाएँ):
wg genkey | tee client.key | wg pubkey > client.pub
client.pub को ऊपर के [Peer] ब्लॉक में डालें (फिर systemctl restart wg-quick@wg0), और क्लाइंट को यह कॉन्फ़िग दें:
[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
इसे WireGuard ऐप में इम्पोर्ट करें (मोबाइल पर qrencode -t ansiutf8 < client.conf से QR सबसे तेज़ है), चालू करें — और आप अपने खुद के सर्वर से रूट कर रहे हैं।
नोट्स
- DPI के पीछे (ईरान/चीन/रूस)? WireGuard फ़िंगरप्रिंट होकर ब्लॉक हो जाता है — इसके बजाय VLESS + Reality उपयोग करें।
- वेब UI पसंद है? एक-कमांड wg-easy रास्ता इसे QR-कोड एडमिन पैनल के साथ सेट करता है।
Nano-IP ($8/माह) भरपूर है, बिना मीटर वाला ट्रैफ़िक, लगभग एक मिनट में root, कोई KYC नहीं, क्रिप्टो में भुगतान।
टिप्पणियाँ
अभी तक कोई टिप्पणी नहीं। पहले बनें।