Networking • Security
PiVPN (WireGuard) — Secure Remote Access
Built a private VPN for remote access to my home network and services. Focused on simplicity, performance, and eliminating sketchy port forwards.
ProtocolWireGuard (UDP)
RoutingSplit/Full tunnel
ReachabilityDynDNS + NAT
Goal
Reach home network resources (Jellyfin, admin panels, SMB shares) securely from anywhere.
Environment
- Raspberry Pi - PiOS lite
- Router with static IP & port forwarding
- Dynamic DNS for changing WAN IPs
Steps (high level)
- Install PiVPN with WireGuard
- Reserve static IP on the router
- Create client profiles for mobile devices and PC.
- Set allowed IPs
- Test on all devices remotely
Troubleshooting highlight
DHCP Settings
Initiially could not connect to internet through VPN. Troubleshooting steps led me to remove automatic DHCP settings and configure manually.
Client snippet (WireGuard)
[Interface]
PrivateKey = <redacted>
Address = 10.6.0.2/24
DNS = 10.6.0.1
[Peer]
PublicKey = <server-public-key>
Endpoint = <redacted>
AllowedIPs = 10.6.0.0/24, 192.168.1.0/24 # split tunnel to home subnets
PersistentKeepalive = 25Outcome
Fast, reliable access to the home network from anywhere. Only necessary open ports; one hardened entry point.