Closed rfrancoesq closed 1 year ago
Perhaps the windows client is trying to connect to the public IP host of the rustdesk server and it can't go out of your firewall and come back in. Maybe set the DNS manually to the local IP of rustdesk server in hosts file or whatever you are using for DNS on the windows server. So it contacts the rustdesk server directly over the lan.
Fixed! I should have known... it's always DNS. Thank you!!
I'll elaborate in case it may help anyone else. I had used the local IP address for the ID/Relay Server on the client that was on the LAN with the RustDesk Server. It showed a "Ready" green light, so I assumed it was connected fine. But, as mentioned it was unable to connect to any other clients, and no other clients could establish a connection with it.
As you suggested, I changed the ID/Relay Server to the fully qualified domain name and added a DNS entry pointing to the local IP of the RustDesk Server. It started working immediately. I used the local IP address instead of the FQDM because it was the only computer that would use it on the LAN, and I thought I could avoid editing the complicated split-brain DNS configuration we use internally. Guess I was wrong (and it turned out not to be so complicated to edit after all).
You guys rock...spent a few days scratching my head trying to troubleshoot this and DNS was my issue too. I had to create a batch file to change my host file with an entry to my synology.me ddns address depending on if i was on my local network or a public one...I'm sure there's a more sensible way of doing this but after a few days of lost time, a win's a win. For context i'm using a pfsense firewall and Adguard for dns
Hello!
Actually this should be considered a bug. I stumbled on this issue myself, here is what I discovered:
I've got a server running on the LAN with local IP 192.168.0.55. This server is also accessible from the outside as rustdesk.example.tld.
WAN -> WAN = works WAN -> LAN = does not work (as per this ticket)
What happens, is that the relay daemon (hbbr) fails to match the clients because the WAN client is using the relay server as rustdesk.example.tld
, while the LAN client is using the relay server as 192.168.0.55
.
Both connect to the relay file and both have a green "Ready" status. But the relay server still fails to pair them.
Yes the quick and dirty solution, is to modify the LAN DNS to override the resolution of the rustdesk.example.tld
to point to the rustdesk server, but that is not a clean solution.
Thank you.
Instead of statically setting the internal IP of the relay server using and internal DNS or hosts file, the other thing that will make it work is to use NAT reflection on the router/firewall if it is available. As an example this does work using pfsense Pure NAT mode in the advanced, firewall + NAT page.
Well, its still a bug because using NAT reflection is just a band-aid, bypassing the actual problem. The actual problem, is that the relay daemon can't pair WAN to LAN when WAN is using a FQDN and LAN is using an IP address.
I also have the problem that @ghost described very well.
Settings that work with opnsense:
I'm hosting RustDesk Server on Synology NAS (with Docker) on LAN. I have 4 clients. One client is a Windows Server on the same LAN as the Synology NAS. The other clients are: Linux Desktop at my home, a Linux Desktop at my office, and a Windows Desktop also at my office. I can connect to and from all of the "other" clients (all outside the of the LAN), but I cannot establish a connection to or from the Windows Server on the LAN.
When I attempt to connect to the Windows Server client I get a "Connection Error" window that says "Failed to connect to relay server: Please try later."
Log message on HBBR says: "[2022-10-30 16:22:57.435394 +00:00] INFO [src/relay_server.rs:446] New relay request 6a2e68b2-e544-4bf3-baa5-bda82356140c from 192.168.X.X:64674". No other entries.
The local IP address shown is the local IP address of the Windows Server, so it appears to be making the request, but it doesn't get paired with the "other" client that initiated the connection. That confuses me, because when there are two "other" clients outside of the LAN, I get 3 logged messages: a "new relay request", "relay request.... got paired", and "both are raw".
I used the instructions at https://rustdesk.com/docs/en/self-host/synogy/ for setup.
Any thoughts would be greatly appreciated.
Best, Robert.