-
Notifications
You must be signed in to change notification settings - Fork 200
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
DNS66 is blocking STUN/TURN traffic #193
Comments
Then the lookup code is wrong. We only redirect special IP addresses corresponding to the DNS servers, all traffic to the internet does not arrive in the VPN. So Threema probably force uses the VPN despite the VPN not having globally routed IP addresses. |
Thanks, the issue is probably related to the IP handling mode of WebRTC: https://tools.ietf.org/html/draft-ietf-rtcweb-ip-handling-04#section-5
According to the docs for VpnService.Builder.allowBypass (which you never explicitly call), by default applications are not allowed to bypass the VPN unless they explicitly bind to the underlying network, which WebRTC probably does not do due to privacy considerations. This also seems to affect other WebRTC based applications like Signal (see #181). Whitelisting works, but since the intent is to block ads, you might or might not want to change the default behavior. |
This is unfortunately correct but caused by Google's WebRTC library. The library gathers the default address by the following technique:
And they use exactly 8.8.8.8 which in many cases will be a configured DNS server. Thus, Be aware that this is an issue that will affect most applications that utilise WebRTC (including browsers) and moreover might even affect other browsers that implement WebRTC. As a workaround, it might be feasible to just allow traffic that passes through the TUN interface but doesn't look like a DNS packet. Sure, it's inefficient but at least it should work. |
8.8.8.8 is not configured as an address for the TUN interface, we do address translation: The addresses are bound to 192.0.2.k, k >= 1 or 2 or something. Thus connect() to 8.8.8.8 should not bind to the local address of the TUN interface. |
At least a C binary with connect() to 8.8.8.8 and getsockname() does not report back the TUN IP. |
This might help with #193, not sure.
0.5.6 now calls allowByPass(), maybe that helps, I don't know. Any way to test that? |
According to WebRTC troubleshooter, I get Relay,Reflexive, and Host connectivity; and sharing stuff via reep.io works as well. |
That only happens if 8.8.8.8 is configured as a DNS server locally. Have you tried that? |
So, I don't see anything for me to do here. |
DNS66 is blocking STUN/TURN lookups for the WebRTC based call feature in Threema. The STUN lookups are done through UDP via ports 3478, 443 and 53. (Yes, using port 53 is ugly, but unfortunately required to get around restrictive but dumb firewalls.)
With DNS66 enabled, no reflexive or relay ICE candidates can be gathered. Does DNS66 explicitly try to block this traffic?
The text was updated successfully, but these errors were encountered: