
VPS पर WireGuard VPN स्वयं होस्ट करें.
अपने personal VPN तक पंद्रह मिनट.
"कोई server नहीं" से "मेरा अपना personal VPN" तक पाँच चरण — signup पर KYC-free, crypto-paid, trust chain में कोई third-party VPN provider नहीं. Mainline kernel में WireGuard 1.0+ के साथ Debian 12 पर tested.
- 01
Provision
एक Nordic VPS
- 02
Install करें
apt install wireguard
- 03
कॉन्फ़िगर करें
Keys + wg0.conf
- 04
Firewall
UDP 51820 + forwarding
- 05
Connect करें
wg-quick up wg0
एक Nordic bastion चुनें जहाँ आप रहते हैं उसके करीब.
Panel में: Order → VPS → Sentinel ($5.90/माह, 2 vCPU / 4 GB / 120 GB NVMe). Sentinel के पास unlimited bandwidth और एक 1 Gbps uplink है — पूरी streaming पर भी personal VPN के लिए पर्याप्त. वह bastion चुनें जो आप physically जहाँ हैं वहाँ से सबसे करीब है, क्योंकि आप जो हर byte भेजते हैं वह अपने destination तक पहुँचने से पहले VPS से गुज़रता है. एक European customer Stockholm या Helsinki चुनता है; एक Americas / Asia customer Reykjavík (सबसे कम transatlantic latency) या Oslo चुनता है.
OS image: Debian 12 recommendation है. Ubuntu 22.04+ identically काम करता है. Alpine काम करता है लेकिन अलग package names (apk add wireguard-tools) का उपयोग करता है. FreeBSD भी काम करता है लेकिन config syntax diverge करता है. Server लगभग 90 seconds में boot होता है; root credentials panel में एक बार दिखाई जाती हैं.
एक package, kernel में पहले से.
root के रूप में SSH में प्रवेश करें. फिर:
apt update
apt install -y wireguard qrencode
बस इतना ही. WireGuard 5.6 (मार्च 2020) से mainline Linux kernel में है, इसलिए apt केवल user-space tools (wg, wg-quick) इंस्टॉल करता है — कोई module compilation नहीं, कोई DKMS नहीं, कोई kernel rebuild नहीं. qrencode package चरण 5 में client config को phone पर QR के रूप में push करने में उपयोगी होगा.
अभी IP forwarding enable करें ताकि हम step 4 पर भूलें नहीं:
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
echo "net.ipv6.conf.all.forwarding=1" >> /etc/sysctl.conf
sysctl -p
Keys generate करें, wg0.conf लिखें. दो मिनट.
एक server key pair generate करें:
cd /etc/wireguard
umask 077
wg genkey | tee server_private.key | wg pubkey > server_public.key
अब प्रति device एक client key pair generate करें:
wg genkey | tee laptop_private.key | wg pubkey > laptop_public.key
wg genkey | tee phone_private.key | wg pubkey > phone_public.key
Server settings + प्रति client एक [Peer] block के साथ /etc/wireguard/wg0.conf बनाएँ:
[Interface]
PrivateKey = <contents of server_private.key>
Address = 10.66.66.1/24, fd00:66::1/64
ListenPort = 51820
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
# laptop
PublicKey = <contents of laptop_public.key>
AllowedIPs = 10.66.66.2/32
[Peer]
# phone
PublicKey = <contents of phone_public.key>
AllowedIPs = 10.66.66.3/32
UDP 51820 खोलें. बाकी lock करें.
यदि आप UFW (Ubuntu पर default) का उपयोग करते हैं:
ufw default deny incoming
ufw default allow outgoing
ufw allow 22/tcp # SSH (consider port-knocking or VPN-only in production)
ufw allow 51820/udp # WireGuard
ufw enable
NordBastion bastions के पास panel से managed एक upstream firewall भी है — आप defence in depth के लिए वहाँ same rules replicate कर सकते हैं. Bastion-level firewall packet VPS तक पहुँचने से पहले block करता है, जो volumetric scanning पर CPU बचाता है.
एक privacy tip जिसे follow करना उचित है: WireGuard ListenPort को 51820 (default, जिसे scanners खोजते हैं) से 1024 और 65535 के बीच एक random port पर बदलें. यह एक दृढ़ adversary के विरुद्ध सुरक्षा में सुधार नहीं करता लेकिन random scanners से noise कम करता है.
Tunnel शुरू करें. पहला client seconds में connected.
Server पर:
systemctl enable --now wg-quick@wg0
wg # status: should show interface up
Server पर एक client config (laptop.conf) बनाएँ, फिर इसे laptop पर copy करें:
[Interface]
PrivateKey = <contents of laptop_private.key>
Address = 10.66.66.2/24, fd00:66::2/64
DNS = 1.1.1.1, 9.9.9.9 # or your favourite privacy resolver
[Peer]
PublicKey = <contents of server_public.key>
Endpoint = <server-ip>:51820
AllowedIPs = 0.0.0.0/0, ::/0
PersistentKeepalive = 25
Mobile के लिए, config को qrencode के माध्यम से pipe करें और WireGuard app से scan करें:
qrencode -t ansiutf8 < phone.conf
बस इतना ही. client connect होता है, tunnel आता है, और laptop / phone अब Nordic bastion के माध्यम से internet तक पहुंच रहा है. इससे verify करें: curl https://api.ipify.org — लौटाया गया IP VPS का public IP है, आपका घर का नहीं.
प्रश्न, उत्तरित।
आठ प्रश्न जो एक first-time self-hosted-VPN customer पूछता है.
NordVPN / Mullvad / ProtonVPN उपयोग करने के बजाय WireGuard VPN को self-host क्यों करें?
तीन वास्तविक कारण. (1) Trust chain सिकुड़ती है. एक commercial VPN है "इस कंपनी पर भरोसा करें कि यह आपको log न करे"; एक self-hosted है "इस VPS provider पर भरोसा करें कि यह आपको log न करे" — एक कम पक्ष. (2) VPN endpoint केवल आपका है. Commercial VPN exit IPs हजारों उपयोगकर्ताओं के बीच shared हैं और कई services द्वारा blocked; आपका self-hosted endpoint एक fresh clean IP है जिसे किसी ने flag नहीं किया. (3) लागत. NordBastion Sentinel $5.90/month है और unlimited-bandwidth VPN चलाता है; commercial VPNs shared infra के लिए $5-$15/month हैं.
OpenVPN के बजाय WireGuard क्यों?
WireGuard छोटा है (4,000 lines of kernel code बनाम OpenVPN के ~100,000), तेज (अक्सर same hardware पर 3-5× अधिक throughput), configure करने में सरल (CA/cert/dhparam plumbing के बजाय एक single config file), और audit-friendly. यह 5.6 (2020) से mainline Linux kernel में है इसलिए कोई compilation step नहीं. OpenVPN legacy compatibility और TCP-based traffic के लिए उपयोगी रहता है; बाकी सब के लिए WireGuard आधुनिक default है.
क्या मेरा ISP जानता है कि मैं VPN चला रहा हूँ?
आपका ISP port 51820 पर NordBastion IP पर जाने वाला encrypted UDP traffic देखता है. वह pattern VPN traffic के रूप में पहचाना जा सकता है; दूसरी तरफ क्या है, नहीं. यदि "VPN बिल्कुल चलाना" आपके context में sensitive है, तो WireGuard को port 443 पर चलाएं (यह TCP नहीं UDP बोलता है, लेकिन port HTTPS जैसा ही है), और udp2raw जैसे obfuscation wrapper पर विचार करें यदि ISP सक्रिय रूप से WireGuard handshakes block करता है.
क्या मैं VPS को VPN और अन्य चीज़ों के लिए server के रूप में उपयोग कर सकता हूँ?
हां, सामान्य pattern. VPS WireGuard plus जो भी आपको चाहिए चलाता है — एक personal website, एक Bitcoin node, एक Mastodon instance. firewall rules VPN traffic और public-facing services को isolated रखते हैं; iptables/nft VPN clients को specific local services पर route कर सकते हैं और अन्य पर नहीं.
IP geolocation के बारे में क्या — क्या sites सोचेंगी कि मैं Sweden में हूं?
हां — आपका exit IP वह NordBastion bastion है जो आपने चुना. IP से geofence करने वाली streaming services आपको Swedish (Stockholm bastion), Finnish (Helsinki), Norwegian (Oslo) या Icelandic (Reykjavík) मानेंगी. Banking sites जो "नए देश से logged in" flag करते हैं अपने fraud rules trigger करेंगे; यह सामान्य व्यवहार है, VPN की समस्या नहीं.
एक WireGuard server कितने clients handle कर सकता है?
Personal use के लिए practically unlimited. प्रत्येक peer कुछ KB memory जोड़ता है. Constraint bandwidth और bastion का uplink है, WireGuard daemon खुद नहीं. Unlimited bandwidth और 1 Gbps uplink के साथ Sentinel tier WireGuard process के notice करने से पहले saturate हो जाएगा.
क्या मुझे इसे एक dedicated VPS पर चलाना चाहिए या अन्य workloads के साथ share करना चाहिए?
एक dedicated VPS OPSEC perspective से अधिक साफ है — IP से जुड़ी एकमात्र चीज़ है "मेरा personal VPN." यदि आप workloads मिलाते हैं, तो VPN traffic और दूसरे workload की traffic एक outgoing IP साझा करती है, और किसी भी की प्रतिष्ठा समस्या दूसरे पर फैलती है. $5.90/माह के लिए उन्हें अलग रखना उचित है.
क्या self-hosted WireGuard kill-switch capable है?
हां, client-side. WireGuard configs एक PostUp / PostDown block का समर्थन करते हैं जहां आप iptables rules जोड़ते हैं जो tunnel up होने पर non-VPN traffic drop करते हैं; आप client OS को भी डिफ़ॉल्ट रूप से non-VPN connections refuse करने के लिए सेट कर सकते हैं. कई open-source manager apps (wg-easy, WireGuard-UI, Pi-VPN) यह आपके लिए wrap करते हैं.
एक Sentinel order करें और अपना VPN शुरू करें.
अंतिम review · 2026-05-20 · परीक्षित · Debian 12 · WireGuard 1.0.20210914
Anonymous VPS hosting in 2026 — the cluster.
This guide is one spoke of a larger series. The pillar walks the three privacy layers end to end — the sibling spokes below dive into the specifics.
Three independent layers — signup, payment, network — explained, legal context included, common mistakes flagged.
A v3 .onion address that survives reboots and IP changes.
What “no KYC” actually means — and what it does not.
Why Sweden, Finland, Norway and Iceland — the legal floor of each.
XMR end-to-end — wallet, transfer, confirmations, change.