celzero / rethink-app

DNS over HTTPS / DNS over Tor / DNSCrypt client, WireGuard proxifier, firewall, and connection tracker for Android.
https://rethinkfirewall.com/
Apache License 2.0
2.58k stars 129 forks source link

v055e: WireGuard with multiple DNS entries #1372

Closed nomisma-qt closed 1 day ago

nomisma-qt commented 2 months ago

I think I found the issue: at least if you have a custom DNS specified as I have, the Fritzbox Wireguard config for the client contains these two lines specifying the DNS:

DNS = 192.168.178.199,192.168.178.1
DNS = fritz.box

I do not know if this is according to the Wireguard spec or if the implementation from AVM is faulty, but there are two differences between the official Wireguard client and RethinkDNS:

As soon as I delete the DNS entry in ReThink and replace it with only the correct DNS entry, the connection works.

Originally posted by @Braintoe in https://github.com/celzero/rethink-app/issues/1298#issuecomment-2016905913

ignoramous commented 2 months ago

A user says,

I run my own WG peer on a VPS (trailofbits/algo project.) It provides a QR code for setup. That QR code includes the default DNS server configured in the settings on the VPS server, with both ipv4 and ipv6 addresses. If i use that QR code to set up my android phone to use WG for example with the "WG Tunnel" app by Zane Schepke, found on F-Droid, then the VPN tunnel works fine.

In rethink, DNS does not work by default. In 'wg3' edit mode, where i edit the name, private key, public key, peer addresses and DNS servers, there are two addresses for the DNS, ipv4 and ipv6.

I have to remove the ipv6 address after the comma.

ignoramous commented 2 weeks ago

I have to remove the ipv6 address after the comma.

See: #1483

ignoramous commented 1 day ago

We fixed this issue but it caused a bunch of other issues... But this one has been fixed.