Privacy Tools Guide

Setting up a VPN for remote access to your home network while traveling solves a common problem: how to securely connect to home servers, smart home devices, and local files when you’re halfway across the world. This guide covers the technical approaches, from self-hosted solutions to cloud-based tunnels, with configuration examples you can implement today.

Why You Need Home Network VPN Access

When traveling, you likely encounter situations where accessing your home network would be valuable. Perhaps you need to grab a file from your NAS, check on home automation systems, or access a development server running on a Raspberry Pi. Public solutions exist, but they come with trade-offs: subscription costs, bandwidth limits, and reduced control over your data.

A self-hosted VPN gives you complete ownership of your connectivity. You control the server, the encryption, and the access policies. No monthly fees once the infrastructure is in place, and you can scale bandwidth as needed.

Option 1: WireGuard on a Home Server

WireGuard has become the go-to VPN protocol for self-hosted setups. It offers excellent performance, modern cryptography, and a straightforward configuration format. The main requirement is a device at home that stays powered on—typically a Raspberry Pi, an old laptop, or a dedicated mini PC.

Server Installation

On a Debian-based system, install WireGuard with:

sudo apt install wireguard

Generate the server keys:

wg genkey | tee private.key | wg pubkey > public.key

Create the server configuration at /etc/wireguard/wg0.conf:

[Interface]
Address = 10.0.0.1/24
PrivateKey = <your-server-private-key>
ListenPort = 51820
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT
PostUp = iptables -A FORWARD -o wg0 -j ACCEPT
PostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

[Peer]
PublicKey = <your-client-public-key>
AllowedIPs = 10.0.0.2/32
PersistentKeepalive = 25

Enable IP forwarding by adding to /etc/sysctl.conf:

net.ipv4.ip_forward = 1

Client Configuration

Generate client keys on your traveling device, then configure the client:

[Interface]
PrivateKey = <your-client-private-key>
Address = 10.0.0.2/32
DNS = 1.1.1.1

[Peer]
PublicKey = <your-server-public-key>
Endpoint = your-home-domain.dyndns.org:51820
AllowedIPs = 10.0.0.0/24, 192.168.1.0/24
PersistentKeepalive = 25

The AllowedIPs setting is critical here. Including your home network subnet (192.168.1.0/24 in this example) routes all traffic for your home network through the VPN tunnel. This is what enables you to access local devices like your NAS or smart home hub.

For dynamic DNS, set up a service like DuckDNS or Cloudflare to point a domain to your home IP address. You’ll need to forward port 51820 from your router to the WireGuard server.

Option 2: OpenVPN for Broader Compatibility

While WireGuard is more efficient, OpenVPN remains useful when you need broad client compatibility or are traversing restrictive networks that block UDP. OpenVPN works on any device, including routers with custom firmware.

Quick OpenVPN Setup

Install OpenVPN and generate certificates:

sudo apt install openvpn easy-rsa
cd /usr/share/easy-rsa
./easyrsa init-pki
./easyrsa build-ca
./easyrsa build-server-full server
./easyrsa build-client-full client

Create the server configuration:

sudo cp pki/ca.crt pki/issued/server.crt pki/private/server.key /etc/openvpn/

A minimal /etc/openvpn/server.conf:

port 1194
proto udp
dev tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh.pem
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 1.1.1.1"
persist-key
persist-tun
status /var/log/openvpn/status.log
verb 3

OpenVPN generates client configuration files that include all necessary certificates. Distribute these securely to your traveling devices. The client file bundles the CA certificate, client certificate, and private key into a single .ovpn file that works with most VPN clients.

Option 3: Cloud Tunnel with Tailscale

If your home network lacks reliable port forwarding (common with CGNAT or restrictive ISPs), a cloud tunnel approach using Tailscale provides an elegant solution. Tailscale builds on WireGuard but handles NAT traversal and relay automatically through its coordination servers.

Setting Up Tailscale

Install Tailscale on your home server:

curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up --advertise-routes=192.168.1.0/24

The --advertise-routes flag tells Tailscale to advertise your home network to other devices on your Tailnet. Enable subnet routing in the Tailscale admin console under Device > Edit route settings.

Install Tailscale on your traveling device and log in with the same account. The home network route automatically appears, and you can toggle it on/off from the client.

Tailscale handles the complex NAT traversal automatically. The connection uses WireGuard under the hood, giving you excellent performance with minimal configuration. The tradeoff is relying on Tailscale’s coordination servers for connection establishment, though all traffic flows directly between your devices.

Security Considerations

Regardless of which approach you choose, several security practices apply:

Use strong key management. Generate keys with proper entropy using hardware random number generators when possible. Store private keys securely—never in version control.

Implement network segmentation. Your VPN should access only the networks and services you need. Avoid broad 0.0.0.0/0 routes unless necessary.

Enable firewall rules. Configure your home firewall to accept VPN traffic only from established peers. Block any traffic not originating from the tunnel.

Consider certificate-based authentication for OpenVPN. While pre-shared keys work, certificate authentication provides better key rotation and revocation capabilities.

Monitor connection logs. Watch for unexpected connection attempts or unusual access patterns.

Performance Optimization

VPN throughput depends on several factors. WireGuard typically achieves near-line-speed performance on modern hardware. OpenVPN adds more overhead, especially with UDP compression.

For bandwidth-intensive tasks like large file transfers, consider these optimizations:

If you experience slow speeds with Tailscale, check that direct peer connections are established. The tailscale status command shows connection types—look for “direct” rather than “relay” for optimal performance.

Choosing Your Approach

Each solution fits different scenarios:

All three approaches give you secure, encrypted access to your home network while traveling. The self-hosted options provide complete control and no subscription costs. Tailscale trades some control for simpler setup in difficult networking environments.

Start with the option matching your technical comfort level and network constraints. You can always migrate between solutions as your needs change.

Built by theluckystrike — More at zovo.one