August 16, 20196 yr 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.
August 29, 20196 yr 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.
February 10, 20215 yr 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.
February 20, 20215 yr It goes in your nginx.conf. In mine, it's right after the events{} block and before the http{} block.
Archived
This topic is now archived and is closed to further replies.