Your 'No-Logs' VPN Is Lying — Build Your Own WireGuard in 15 Minutes

Your 'No-Logs' VPN Is Lying — Build Your Own WireGuard in 15 Minutes

Derrk SamuelSeptember 22, 20267 min read
Court records keep proving 'no-logs' VPNs keep logs. The fix costs $0: a 15-minute WireGuard server on the Ubuntu box you already run — one config file, a QR code for your phone, and the one firewall rule everyone gets wrong.

The 'No-Logs' Lie Is in the Court Records

Every few years another "no-logs" VPN provider gets caught handing law enforcement the exact connection logs it swore it never kept. The business model guarantees the tension: they charge you monthly to move your traffic, their servers see everything your home ISP would — and you're trusting a marketing page that the fine print quietly contradicts.

The fix isn't a better VPN brand. It's deleting the middleman.

Why Self-Hosting Feels Harder Than It Is

A private VPN sounds like a weekend project: certificates, kernel configs, arcane iptables incantations. That description belongs to OpenVPN. WireGuard threw all of it away — a tiny kernel module, one config file, and a QR code for your phone.

The payoff: 15 minutes and $0 on the Ubuntu server you already run buys a tunnel only two parties can see into — your device and your own box. No logs page, no third party, no subscription. And because keys are pre-shared, no untrusted connection is ever accepted in the first place.

Step 1 — Install WireGuard and Generate Keys

On the server:

sudo apt install wireguard -y
wg genkey | sudo tee /etc/wireguard/server.key | wg pubkey | sudo tee /etc/wireguard/server.pub

Then a keypair for your first client (phone or laptop):

wg genkey | tee client.key | wg pubkey > client.pub

The private keys are the entire security model — they never leave the two config files below.

Step 2 — One Server Config

Create /etc/wireguard/wg0.conf:

[Interface]
PrivateKey = <contents of server.key>
Address = 10.0.0.1/24
ListenPort = 51820
PostUp = sysctl -w net.ipv4.ip_forward=1; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = sysctl -w net.ipv4.ip_forward=0; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

[Peer]
PublicKey = <contents of client.pub>
AllowedIPs = 10.0.0.2/32

Swap eth0 for your server's actual interface (ip a shows it). Bring the tunnel up for good:

sudo systemctl enable --now wg-quick@wg0

Step 3 — The Client Is a QR Code

Create client.conf:

[Interface]
PrivateKey = <contents of client.key>
Address = 10.0.0.2/32
DNS = 1.1.1.1

[Peer]
PublicKey = <contents of server.pub>
Endpoint = your-server-ip:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25

AllowedIPs = 0.0.0.0/0 is the "route all my traffic through the tunnel" switch. Render the config as a scannable code:

sudo apt install qrencode -y
qrencode -t ansiutf8 < client.conf

Install the WireGuard app on your phone, tap Create from QR code, scan the terminal, connect. That is the entire client setup.

Step 4 — The Firewall Rule Everyone Gets Wrong

WireGuard is UDP — the number-one setup failure is opening the TCP version of the port:

sudo ufw allow 51820/udp

If you followed the SSH hardening guide, this is the only firewall change needed; everything else stays default-deny.

Verify It From Your Phone

  1. Connect to hotel or airport Wi-Fi — the entire point of the exercise
  2. Visit a what-is-my-IP site: it shows your server's IP, not the Wi-Fi network's
  3. On the server, run sudo wg — a fresh latest handshake and a growing transfer counter mean traffic is flowing

Quick Reference

TaskCommand
Generate a keypairwg genkey then wg pubkey
Start the tunnelsudo systemctl enable --now wg-quick@wg0
Show live peerssudo wg
Open the portsudo ufw allow 51820/udp
Client QR codeqrencode -t ansiutf8 < client.conf

The Wrap-Up

A VPN you rent is a promise. A VPN you build is a fact. Fifteen minutes on hardware you already own, and the only parties who know your traffic are the two that matter: your device and your server.

Hit a roadblock — wg showing no handshake, the QR code refusing to scan, or UFW eating your SSH session mid-config? Drop a comment below and I'll help you dig out.

Also featured on TechDerks Insights

I write more takes like this one on my second blog — blockchain deep dives, security breakdowns, and builder tools.

Read more on TechDerks Insights
D

Derrk Samuel

Web3, crypto, and Linux PC insights — practical guides, security tips, mining setups, blockchain tools, and decentralized tech strategies for techs.

Discussion

Leave a comment

No comments yet. Be the first to start the discussion!