Two-VPS Private Proxy Architecture: Nginx Reverse Proxy Over Wireguard VPN
Overview
Prerequisites
1. Generate Wireguard Keys on Both VPSes
wg genkey | tee privatekey | wg pubkey > publickey
chmod 600 privatekey publickey2. Configure Wireguard on Proxy VPS
3. Configure Wireguard on Backend VPS
4. Ensure Backend App Port Is Not Publicly Exposed
4.1 Bind the Service to the VPN IP
4.2 Firewall Configuration on Backend VPS
4.3 Verify Port Binding and Traffic Restrictions
4.4 Optional: NAT Port Forwarding on Proxy VPS
5. Configure Nginx on Proxy VPS
6. Configure DNS and SSL
7. Test Your Setup
Summary Table
Step
Purpose
Last updated