<< RETURN TO ARCHIVE

The Self-Sovereign Tunnel: Rolling Your Own VPN

Author: Wander | Date: 2025-12-23

Introduction: The Myth of the Silver Bullet

You’ve heard the ads. “Military-grade encryption.” “Protect yourself from hackers.” “Hide from the government.” Most commercial VPN marketing is snake oil designed to separate you from your money while centralizing your traffic data into a convenient honeypot.

Building your own VPN puts you in control of the infrastructure. It ensures there are no logs (unless you enable them), no shared IP usage with criminals (which gets IPs blacklisted), and no third-party “trust me bro” guarantees.

However, before we drop into the terminal, we need a reality check.

What a VPN DOES Protect You From

  1. Local Network Snooping: When you’re on public WiFi at airport, coffee shop, or hotel, a VPN encrypts traffic between your device and your server. The guy running Wireshark at the next table sees nothing but encrypted noise.
  2. ISP Surveillance (Partial): Your ISP (Comcast, AT&T, etc.) can no longer see what websites you visit, only that you are talking to a specific server (your VPN VPS).
  3. Geo-Blocking: You can appear to access the internet from the country where your VPS is hosted.

What a VPN DOES NOT Protect You From

  1. Browser Fingerprinting: Ad networks and trackers identify you by screen resolution, installed fonts, browser version, and canvas rendering. Your IP is just one data point.
  2. Malware: A VPN does not stop you from downloading a virus.
  3. Bad OpSec: Logging into Google/Facebook while on a VPN still tells Google/Facebook exactly who you are.

The Elephant in the Room: Nation-State Actors

If your threat model includes the NSA, GCHQ, MSS, or FSB, a VPN is not a cloak of invisibility.

If you conduct operations that attract the attention of a nation-state:

Conclusion: Use a VPN for privacy from corporations and local snoops. Do not rely on it if your life depends on anonymity. Use Tor (and even then, good luck).


The Setup: WireGuard using wg-easy

We will use wg-easy, a simple and easy to use WireGuard installer and web UI. It is much easier for users to manage than Algo.

Source / Attribution: This guide is based on the official wg-easy Basic Installation tutorial.

Basic Installation

Requirements

Step 1: Install Docker

If you haven’t installed Docker yet, install it by following the official docs, or run this convenience script as root:

curl -sSL https://get.docker.com | sh

After installation, exit your session or run newgrp docker if you configured non-root access, then log in again.

Step 2: Install wg-easy

Create a directory for the configuration files (you can choose any directory you like):

sudo mkdir -p /etc/docker/containers/wg-easy

Download the docker compose file:

sudo curl -o /etc/docker/containers/wg-easy/docker-compose.yml https://raw.githubusercontent.com/wg-easy/wg-easy/master/docker-compose.yml

Step 3: Start wg-easy

Navigate to the directory and start the container:

cd /etc/docker/containers/wg-easy
sudo docker compose up -d

Step 4: Setup Firewall

If you are using a firewall (like UFW), you need to open the following ports:

sudo ufw allow 51820/udp

Step 5: Setup Reverse Proxy (Optional)

You can access the Web UI directly via IP:Port if you open the port, but a Reverse Proxy with SSL is recommended.

Maintenance & Updates

To update wg-easy to the latest version, run:

cd /etc/docker/containers/wg-easy
sudo docker compose pull
sudo docker compose up -d

For auto-updates, consider using Watchtower.

Connect

Once running, access the Web UI (e.g., http://YOUR_IP:51821), log in, and create a client.

Verification

Go to https://ipleak.net.

  1. IP Address: Should match your VPS, not your home.
  2. DNS Leak: Should show DNS servers belonging to your VPS provider or the public DNS you chose, not your home ISP (Comcast, etc.).

Maintenance

Your server is ephemeral. Treat it as cattle, not a pet.

Final Warning

In the world of cybersecurity, tools are not solutions. A VPN is a tool. Your operational security mindset is the solution. Stay paranoid.