Very informative posts here have helped me with my setup. One thing I don’t think I’ve seen though is what I can best describe as port forwarding within NGINX. Maybe I’m using the wrong terminology.
→ @ IP *.202 windows 10 machine running game server on port 30000.
So HassOS works great, I can connect locally and externally via duckdns with no issue.
However when I try to get to my-domain.duckdns.org:30000, I get “SSL Protocol Error”. If I try using my WAN IP I can connect no issue. However I would like to have SSL encryption, since I have it.
So I’m guessing I need to have external port 30000 forwarded to internal 443 at IP *.201, have NGINX validate the SSL and forward the connection to port 30000 at IP *.202?
Or is there a way to configure subdomains with NGINX? Kinda like:
Hass.my-domain.duckdns would point IP *.201 port 443, and
gameserver.my-domain.duckdns point to IP *
.202 port 30000?
although the topic was solved, I want to reopen it because I’d like to discuss another solution.
If on is not able to use subdomains, could one also forward port 30000 to nginx and setup a server configuration that listens to this port and forwards to the windows machine?
Related question: Is there a way to query the actual port of the request. Say, I listen to 443 and to 30000 in the same server section, could I do something like if $port==443 then proxy pass to .201:433 and if $port==30000 then prox pass to .202:30000?
I just recognized the following: The listen directive requires Nginx to run on the host with the physical interface (if not otherwise virtualized). However, if the add-on runs in a docker container, HA needs to expose the respective port to the HA host. Which it seems does not.
I think, for most HA users, the limitation to the ssl relevant port 443 and using subdomains is pretty fine.