Self-hosted HTTP tunnels with SSH and nginx
Summary
This article shows how to build a self-hosted HTTP tunnel using OpenSSH remote port forwarding and an nginx proxy to expose a localhost service publicly. It covers remote port allocation, nginx proxying, DNS and TLS setup with Let’s Encrypt (DNS-01 via Route 53), and access control using the ngx_http_secure_link_module with expiring hashes. It also discusses security trade-offs and provides scripts to discover the ephemeral port and generate authentication tokens.