Skip to content
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

Unable to connect to relay with VPN #310

Open
kramttocs opened this issue Sep 18, 2023 · 17 comments
Open

Unable to connect to relay with VPN #310

kramttocs opened this issue Sep 18, 2023 · 17 comments
Labels
bug Something isn't working

Comments

@kramttocs
Copy link

Windows PC running the server and client
Android phone running the client. Off network.

With VPN on (I've tried multiple vpn providers) and even with hbbr, hbbs, and the server.exe excluded via split tunneling I am unable to share my phone screen. It says unable to connect to relay. As soon as I disconnect the vpn, the phone shows connected. Even with VPN connected, from my phone I can rdp into the Windows PC so it's not completely blocked.

I am using my hostname as the relay server setting.

@kramttocs kramttocs added the bug Something isn't working label Sep 18, 2023
@dinger1986
Copy link
Contributor

So the issue is when the windows machine is connected to a VPN?

What happens with a trace route?

@kramttocs
Copy link
Author

Sorry, that is correct. The VPN software is running on the Windows machine.
Would I need to run the trace route from the phone?

I wish I could explain it better as it's a bit odd. I would expect all or none to work.
Meaning I am surprised that from my phone I can rdp into the Windows machine since that indicates the relay server is accessible from my phone.
So it's strange that my phone (this also happens with a second off-network Windows machine running just the client) can't connect to the relay to be rdp'd into.

Please note this also being reported here: https://www.reddit.com/r/rustdesk/comments/11aeiuw/vpn_service_on_w10_machine_blocking_rustdesk/

@kramttocs
Copy link
Author

Please let me know what I should put into the trace route also (port?)

@kramttocs
Copy link
Author

Here is my router port forwarding:
image

@dinger1986
Copy link
Contributor

Trace route from the PC to the server don't need a port just hostname or IP

@kramttocs
Copy link
Author

kramttocs commented Sep 18, 2023

Ok. I ran trace route on the same Windows PC that is running both the VPN and RustServer.
Vast difference when VPN is connected vs disconnected.

Disconnected I get one row with all 3 columns being <1 ms
Connected it goes up to 10 rows and then gets Request Timed Out.
Plus the times for rows 1-10 are around 20ms

Looks like this is my problem?

...but I get shouldn't excluding the RustServer exe's make it the same as with vpn disconnected? I feel like there is an exclusion I am just not making.

@dinger1986
Copy link
Contributor

dinger1986 commented Sep 18, 2023

Why not try excluding traceroute and see if that works? I don't really use vpns so can't help specifically about that

@kramttocs
Copy link
Author

:) Was actually just googing where the trace route exe was located...

@kramttocs
Copy link
Author

Even with it (in Windows\System32) added, it still is acting like when it's not excluded

@dinger1986
Copy link
Contributor

Ok so the vpn is doing something weird then even if it's excluded so will be doing the same with rustdesk I guess

@kramttocs
Copy link
Author

Thanks. What's odd is that if I hit my hostname in the browser from the same Windows machine it lets me load up local services (like Plex) immediately.
Maybe that's apples and oranges to traceroute/rustdusk traffic though.

@dinger1986
Copy link
Contributor

yeah that is odd, could try with IP maybe? Or localhost?

@kramttocs
Copy link
Author

Ok, I think the tracert is a false positive.
Even if I tracert google it doesn't work the way I'd expect.
Plus if I do nslookup it comes back with the IP correctly.

I've turned off split tunnelling in the vpn so now I don't have any exe's for rustdesk server excluded.
Behavior is the same. I can rdp into my Windows box but I can't rdp into another device that is using the Windows box as the relay server.

@kramttocs
Copy link
Author

Update: I think some things were cached as it doesn't seem to work with the rustdesk server AND client not added to the split tunnel

@aerozoic
Copy link

aerozoic commented Oct 1, 2024

I'm also unable to connect to another machine unless i disable my VPN.

@RyzeNGrind
Copy link

RyzeNGrind commented Nov 28, 2024

I am also facing the same issue. Are there any updates for workarounds on this issue? Unable to connect with protonvpn activated via rustdesk, but once I am connected to remote machine via rustdesk I can turn on the VPN remotely without the connection getting affected.

Edit: I found a workaround thanks to reddit.
Workaround: Click the triple dots on the target machine and enable "Always connect via relay"

@schneckbear
Copy link

I face the same issues. I share my experience and maybe help someone.

I use ProtonVPN as provider and Rust never worked. Till one time it actually did. I was testing with different IPs. Turned out some IPs worked with some others not.

My Rust server is hosted on a dedicated machine with Hetzner.

It so happens I also have a TS3 server in the same machine and also can’t connect when I am using VPN. And I saw the same behaviour with these 2 IPs. The one not working for Rust was also not working for TS3. And the IP working for Rust was also working for TS3!. what a coincidence.

Investigating further I found out that Hetzner datacenters have DDOS protection before traffic arrives to your server. and partially rejects requests from IPs if they are being involved in DDOS attacks.

VPN IPs are often blacklisted. So little chance you get a clean IP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants