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

When usb-tethering blocks connections from tethered computer to the phone #1880

Open
xandro0777 opened this issue Feb 22, 2025 · 9 comments
Open

Comments

@xandro0777
Copy link

Hi, I like to connect my phone by USB to use the tethered internet connection. On the phone I have sshd running and want to connect to that from the computer, however the connection is never established.. the connection attempt just hangs. Turning off RethinkDNS the connection works as expected.

Interestingly ping works fine.

TIA

@ignoramous
Copy link
Collaborator

My guess why it isn't working...

Listening sockets won't work if VPN is active unless the app/process (I'm guessing sshd is running from within Termux) that's creating those sockets are "excluded" from Rethink.

This is a function of both Rethink (which doesn't expose "port forwarding" or equivalent functionality) & Android how VPN APIs (which don't support raw IP sockets or network namespaces to do transparent port forwarding) are setup in Android.

@xandro0777
Copy link
Author

xandro0777 commented Feb 24, 2025 via email

@xandro0777
Copy link
Author

Excluding termux wroks good enough to make a connection, unfortunately ssh hangs after authentification for some strange reason so I cant fully confirm it is working

@xandro0777
Copy link
Author

I think this issue could be closed when the need to exclude listening apps is documented.

However, it is worth noting that it works out of the box with Netguard so maybe it could be made work like that in RethinkDNS as well?

@ignoramous
Copy link
Collaborator

However, it is worth noting that it works out of the box with Netguard

NetGuard excludes a bunch of IP ranges when subnet is enabled. May be you have it enabled?

https://github.com/M66B/NetGuard/blob/2691d67c2dc45fc85f931fd1d0686f2e39421adb/app/src/main/java/eu/faircode/netguard/ServiceSinkhole.java#L1310

@xandro0777
Copy link
Author

xandro0777 commented Feb 27, 2025 via email

@Lurux
Copy link

Lurux commented Feb 27, 2025

Just chiming in to say that for me, this doesn't affect a specific program, but everything on the computer. Every connection fails or times out. OS is Fedora 41, pretty much default config I think. Rethink is configured in DNS-only mode.

Update: rethink doesn't show dns resolutions in the log. Tethering over wifi sometimes, but rarely, works.

@xandro0777
Copy link
Author

Somewhat off topic, the remaining problem where ssh connection into the phone hangs after authentification remains unresolved - however the same works perfectly if I use the phone as wifi hotspot.

Any idea what is the difference? ifconfig doesn't reveal anything obvious and route doesn't work on Android

@xandro0777
Copy link
Author

Just chiming in to say that for me, this doesn't affect a specific program, but everything on the computer. Every connection fails or times out. OS is Fedora 41, pretty much default config I think. Rethink is configured in DNS-only mode.

Update: rethink doesn't show dns resolutions in the log. Tethering over wifi sometimes, but rarely, works.

Is your problem connections to the phone or connections to the internet from Fedora?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants