-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to connect via relay server #835
Comments
go to discord, https://discord.gg/nDceKgxnkV, there may be some one can help you. Or search in the discord welcome channel, there are many guys who have asked similar questions. |
Do not use nginx reverse proxy function, instead use streams feature of nginx proxy manager. I am using portainer, which is essentially docker compose, but basically you want to remove all ports from your rustdesk docker containers. There should be 2 containers in the stack, HBBS (server) and HBBR (relay). Comment all the ports and then add them to nginx proxy manager container instead. Some ports will be redirected to the server, HBBS container (21115 (tcp), 21116 (udp & tcp), 21118 (tcp)) I also created DNS A record for my domain rustdesk.apps.mydomain.com to point to my vps where docker is hosted so I could use subdomain for server and relay instead of IP address. Just rename your executable to reflect your ip or domain and the public key and you should be good to go. *** Keep in mind, you will need to open those ports in your firewall as well *** |
@troubleshootme Can you please give an example/excerpt of what the streams config block looks like (currently all my micro services utilize subdomains in server blocks)? I am asking because I am using nginx within SWAG and not nginx proxy manager so I would have to manually edit the config(s) |
|
@troubleshootme thanks! While you were answering me I guess I got it to work with the server block/proxy pass method. My initial issue was I was trying to reverse proxy RustDesk like my many other microservices, until I realized I had to actually port forward ports 21115-21119 and not use 80 and 443 like the other microservices. On the nginx side I just copied the guacamole config and changed the bits relating to IP and port...but the port I used was 21117 instead of the 21115 you posted (maybe I have this wrong or the server block passes to the destination IP and the ports are auto-detected and my 21117 entry doesn't matter?). I was testing for open ports on my public IP (with the online tool: https://www.yougetsignal.com/tools/open-ports/) and it kept coming back closed on that range...I opened them up on my router and plugged the public IP into the client ID server and my status was green, yay! But entering my subdomain was not working...so then I turned off the orange cloud proxy at Cloudflare and after a few minutes tried the client again and the status was now green with my subdomain entered. I verified connection was succesfull by downloading the android client and remoting into my VM with no issue... Any downside to using the way I got it to work versus the nginx config you posted? |
@cmcooper1980 I'm currently facing the same issue. Could you maybe paste your nginx config here? That would help a lot, thank you. |
`server {
}` not sure why the code block isn't including the first and last part of the config...but that is what I had. |
Hi @troubleshootme just to be clear, your rustdesk containers are called hbbs.npm & hbbr.npm ? I've tried your solution. I've lesage-npm installed into a bridge network called "reverseproxy". I've successed to use proxy hosts on other several containers (jellyfin, syncthing, ...) With
I've done same for 21116 (TCP & UDP), 21117, 21118 & 21119 NB : after some tests, I remark that if I let all ports forwarded into my router it will success to connect. So I don't understand what the advantages of using npm if we still need to open all the ports externally ? |
I'm also struggling with this right now. Any updates? |
Make sure you are using streams and not proxy hosts. Yes, my containers are hbbs and hbbr and on my network is called npm, typically just the container name works just as well. If your nginx is behind your router, you will have to open those ports in the router but you don't have to expose the container itself. Not a lot of benefits to npm when using streams so entirely optional. I suppose you could host nginx on an external vps and this would mask your wan ip to an extent. |
Outside the LAN, I am unable to connect to system using my relay server, which I have on a reverse proxy. The status shows green (Ready), but I cannot connect. I have all required ports open. What am I missing?
The text was updated successfully, but these errors were encountered: