Homebrew VPS Solutions

Author: JJustis | Published: 2026-01-26 16:57:10

VPN Setup Guide

Secure Connection Between OVH VPS & Old Laptop

30-Step Process WireGuard & OpenVPN Professional Setup
1

VPS Preparation

  1. Order VPS: OVH Manager → VPS SSD (1-2GB RAM)
  2. Select OS: Ubuntu 22.04 LTS or Debian 12
  3. Get Credentials: Save IP, root username/password
  4. Connect via SSH: ssh root@YOUR_VPS_IP
Pro Tip: Choose a VPS location close to your physical location for better latency.
2

VPN Server Installation

WireGuard (Recommended)
  1. Update System: sudo apt update && sudo apt upgrade -y
  2. Download Installer: wget https://git.io/wireguard -O wireguard-install.sh
  3. Run Script: chmod +x wireguard-install.sh && sudo ./wireguard-install.sh
  4. Follow Prompts: Default IP, port 51820, DNS (1.1.1.1)
  5. Add Client: Name it my_laptop
  6. Download Config: Get /root/my_laptop.conf
OpenVPN (Alternative)
  1. Update System: Same as above
  2. Download Installer: wget https://git.io/vpn -O openvpn-install.sh
  3. Run Script: Similar to WireGuard
  4. Select Port: Default 1194 (UDP) or 443 (TCP for restrictive networks)
  5. Generate Client: Name it my_laptop
  6. Get .ovpn File: Download my_laptop.ovpn
3

Laptop Configuration

  1. Prepare OS: Update system; consider lightweight Linux (Lubuntu/Xubuntu)
  2. Install Client:
    • WireGuard: sudo apt install wireguard
    • OpenVPN: sudo apt install openvpn openvpn-systemd-resolved
  3. Place Config File:
    • WireGuard: Copy to /etc/wireguard/wg0.conf
    • OpenVPN: Copy to /etc/openvpn/client/
For Old Laptops: Use lightweight OS like Lubuntu for better performance on older hardware.
4

Connection & Testing

  1. Start VPN Connection:
    • WireGuard: sudo wg-quick up wg0
    • OpenVPN: sudo systemctl start openvpn-client@my_laptop
  2. Verify Connection: ip addr show (look for wg0/tun0)
  3. Test Tunnel: Visit https://whatismyipaddress.com
  4. Confirm Success: Should show VPS IP, not your home IP
  5. Test Connectivity: Browse web, ping 8.8.8.8
Auto-start: For OpenVPN: sudo systemctl enable openvpn-client@my_laptop
5

Security & Management

  1. Harden SSH: Disable password login, use SSH keys only
  2. Configure Firewall: Allow only necessary ports (51820/UDP for WireGuard)
  3. Manage Clients: Re-run script to add more devices
  4. Revoke Access: Use script's "Revoke a user" for lost devices
  5. Auto-updates: Enable unattended security updates
  6. Monitor Logs: Check journalctl for issues
Critical: Never skip SSH hardening and firewall configuration!
+

Additional Considerations

  • Port Forwarding: Advanced setup for hosting services on laptop
  • Server vs Client: VPS = server/gateway; Laptop = client
  • SSH Access: Scripts preserve access via real IP
  • Learning Topics: IP routing, subnets, firewalls, public-key crypto
IP Routing
Subnets
Firewalls (UFW)
Public-Key Crypto

Protocol Choice Recommendation

WireGuard ⭐

  • Faster performance
  • Simpler setup
  • Modern cryptography
  • Less resource-intensive
  • Better for old laptops

OpenVPN

  • More mature
  • Flexible configuration
  • Port 443 TCP option
  • Better for restrictive networks
  • Widely supported

For most users, WireGuard is recommended due to its speed and simpler setup, especially on older hardware.