Jul 21, 2025 11:08 PM
(This post was last modified: Jul 21, 2025 11:11 PM by 7.)
![[Image: legends3.gif]](https://hackforums.net/images/groupimages/custom/legends3.gif)
Build Your Own WireGuard VPN (2025 Edition)
![[Image: divider.gif]](https://i.ibb.co/VYzpsSCJ/divider.gif)
Want full control over your VPN? Here's how to build one with WireGuard on your own VPS — clean, fast, no middlemen.
No subscriptions. No sketchy apps. No logs except the ones you create.
![[Image: divider.gif]](https://i.ibb.co/VYzpsSCJ/divider.gif)
Step 1: Get a VPS
Code
• Ubuntu 20.04 or 22.04
• Root SSH access
• KVM (not OpenVZ)
• Port 51820 (or whatever you want) openGreenCloud, Hetzner, RackNerd — whatever’s cheap and solid. SSH in once it’s deployed.
Step 2: Install WireGuard
Code
sudo apt update && sudo apt upgrade -y
sudo apt install wireguard qrencode -yEnable IPv4 forwarding:
Code
sudo nano /etc/sysctl.confUncomment this line:
Code
net.ipv4.ip_forward=1Then apply it:
Code
sudo sysctl -p Step 3: Generate Server Keys & Config
Code
cd /etc/wireguard
umask 077
wg genkey | tee server.key | wg pubkey > server.pubNow create the server config:
Code
sudo nano /etc/wireguard/wg0.confPaste this and replace `[YOUR_SERVER_PRIVATE_KEY]`:
Code
[Interface]
PrivateKey = [YOUR_SERVER_PRIVATE_KEY]
Address = 10.0.0.1/24
ListenPort = 51820
SaveConfig = true
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADEBring it up:
Code
sudo systemctl enable wg-quick@wg0
sudo systemctl start wg-quick@wg0 Step 4: Add a Client
Create client keys:
Code
wg genkey | tee client.key | wg pubkey > client.pubThen write the client config:
Code
[Interface]
PrivateKey = [CLIENT_PRIVATE_KEY]
Address = 10.0.0.2/24
DNS = 1.1.1.1
[Peer]
PublicKey = [SERVER_PUBLIC_KEY]
Endpoint = your.vps.ip:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25On the server, register the client:
Code
sudo wg set wg0 peer [CLIENT_PUBLIC_KEY] allowed-ips 10.0.0.2/32 Step 5: Use It on Mobile (QR Setup)
Install WireGuard app from App Store or Play Store.
To generate a QR from your client config:
Code
qrencode -t ansiutf8 < client.confScan that with the WireGuard app — done in 5 seconds.
Step 6: Use It on Windows
1. Download the official client:
https://www.wireguard.com/install/
2. Open the app
3. Click Add Tunnel > Add empty tunnel
4. Paste your client config
5. Save & connect
It runs in the background, routes traffic cleanly, and doesn’t leak.
![[Image: divider.gif]](https://i.ibb.co/VYzpsSCJ/divider.gif)
Extras
Code
• You can create as many clients as you want
• Port can be changed if you want stealth (e.g. 443)
• Add firewall rules if you're paranoid
• Works on mobile data and public WiFi without detectionFast, silent, and actually yours.
![[Image: divider.gif]](https://i.ibb.co/VYzpsSCJ/divider.gif)
Legends don’t lease privacy. They build it.
![[Image: vibesignature.gif]](https://i.ibb.co/8LvxwtYQ/vibesignature.gif)
The Brotherhood Vibe Legends



![[Image: ZopETWz.png]](https://i.ibb.co/8g9Vg6qZ/ZopETWz.png)


