Douglas_D Posted August 16, 2019 Share Posted August 16, 2019 Hi, I recently setup a reserve proxy for some applications (Emby, nextcloud, etc) and have all of these working fine, but I am having trouble figuring out if I can reverse proxy into OpenVPN. I have DuckDNS setup and can access my OpenVPN connection using the duckdns address (let's call it mydomain.duckdns.org:943), but my corporate network blocks access to mydomain.duckdns.org. My domain is setup as subdomain.domainname.com and I have CNAMEs setup like emby.domainname.com which does work from my corporate network. So with that, I'm trying to figure out if I can setup something like openvpn.domainname.com and have it point to OpenVPN correctly. I noticed there isn't a template .conf for letsencrypt to setup OpenVPN. Quote Link to comment
Bobat Posted August 29, 2019 Share Posted August 29, 2019 This is definitely possible. I do something very similar with my custom domain and Cloudflare. You need to set up stream proxying in your nginx.conf file. stream { # Defining upstream servers for proxied traffic upstream tcp_backend { server 123.456.7.8:9443; } upstream udp_backend { server 123.456.7.8:1194; } # Defining protocols and ports for data to be proxied. server { proxy_connect_timeout 300s; proxy_timeout 300s; listen 9443; proxy_pass tcp_backend; } server { proxy_connect_timeout 300s; proxy_timeout 300s; listen 1193 udp; proxy_pass udp_backend; } } Where 123.456.7.8 is the internal IP address of your OpenVPN server. Quote Link to comment
xxbigfootxx Posted February 10, 2021 Share Posted February 10, 2021 On 8/30/2019 at 2:41 AM, Bobat said: You need to set up stream proxying in your nginx.conf file. Can you advise where to add this? I get lots of these errors in my .conf file. Quote Link to comment
Bobat Posted February 20, 2021 Share Posted February 20, 2021 It goes in your nginx.conf. In mine, it's right after the events{} block and before the http{} block. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.