AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
24.62k stars 1.78k forks source link

System DNS Override on iOS on T-Mobile USA #202

Closed jravid closed 6 years ago

jravid commented 6 years ago

Steps to reproduce

  1. Download Adguard Pro on iOS 11 on iPhone X running on T-Mobile USA
  2. Add AdGuard DNS servers in IPv6 form as custom DNS server in app
  3. Make sure that you are using the T-Mobile USA cellular network, and are not on Wi-Fi
  4. Activate DNS Settings

Expected behavior

Ads should be blocked

Actual behavior

Ads are not blocked, and an error is thrown in the app. It reads: "Warning You are connected to an ipv6-only network. In such networks you cannot use custom DNS servers. The 'System Default' DNS settings will be used instead."

It seems that using an IPv6 DNS server address alone isn't enough to get around the T-Mobile IPv6-only issue. I saw this mentioned briefly on the AdGuard Reddit (here), but didn't see a resolution and/or an official issue opened on GitHub, so hopefully you have some idea of the steps that would need to be taken to fix this. Please let me know if I can help at all!

Screenshots: ![img_2122](https://user-images.githubusercontent.com/18693464/32429360-4cd61d6c-c298-11e7-84c6-2867718e3aff.PNG) ![img_2123](https://user-images.githubusercontent.com/18693464/32429361-4cdef158-c298-11e7-8a93-e3aab2116ad4.PNG) ![img_2124](https://user-images.githubusercontent.com/18693464/32429362-4ce8070c-c298-11e7-935c-32c27f1f67ca.PNG)

Your environment

Description Value
DNS servers in use: 2a00:5a60::ad1:0ff, 2a00:5a60::ad2:0ff
How did you set up DNS configuration: In app
Device model: iPhone X
Network: T-Mobile USA
Operating system and version: iOS 11.1
Bluscream commented 6 years ago

crapple :thinking:

ameshkov commented 6 years ago

Hm, @jravid could you please try using a custom DNS port?

Something like that: [2a00:5a60::ad1:0ff]:5353

@nkartyshov do we support port 5353 for IPv6?

ameshkov commented 6 years ago

@jravid could you please reproduce the issue and export AG logs?

Here's how: https://kb.adguard.com/en/ios/solving-problems/dns-requests-log

Instead of sending a message to the support service, you can grab the logs and attach to this issue.

nkartyshov commented 6 years ago

@ameshkov Yes, the Adguard DNS server supports port 5353 for IPv6

jravid commented 6 years ago

@ameshkov @nkartyshov

  1. I tried using a custom DNS port in the format described, but still no luck. Ads still come through.
  2. A good temporary solution has been adding to the blacklist the simplified list that you posted on the Reddit thread which I mentioned in the initial issue post, but I've made sure to have nothing blacklisted for the purposes of testing, such that we can get a completely accurate picture of what's going on.
  3. I followed the instructions provided for exporting logs, and I'm attaching the relevant files to this comment. Please let me know if there's anything that I'm missing, or if there's any other way that I can help!

filter.gz com.adguard.AdguardPro.gz com.adguard.AdguardPro.tunnel.gz state.txt

jravid commented 6 years ago

Do we have a better picture as to what's happening yet?

ameshkov commented 6 years ago

@jravid hi! Sorry for the late reply, got my hands full this week. I'll look into it later.

A good temporary solution has been adding to the blacklist the simplified list

Yeah, the thing is that the blacklist works locally, thus it cannot be hijacked by T-Mobile like it happens with regular DNS traffic.

jravid commented 6 years ago

@ameshkov Thanks for the update! Out of curiosity, given that the workaround of adding entries to the blacklist (but still using the system DNS settings) seems to work well, wouldn't it be easy to simply add a feature wherein instead of manually typing in or copy-pasting blacklist entries, one can input a URL, and the app would then automatically pull from and update the blacklist according to the contents of the URL? (The URL would be in a format similar to this, I imagine).

lancelot-moon commented 6 years ago

@jravid @ameshkov @IvanIin

Hi jravid, I also met the similar issue, but it occurred when my iPhone surfed on internet over my Android phone hotspot Wi-Fi. https://github.com/AdguardTeam/AdguardForiOS/issues/528

In Taiwan, there is a net friend who also uses iPhone X. He wrote mails to tell me that ads were not blocked by AdGuard DNS server on PTT BBS. The photo which he sent to me shows that he enabled cellular network and Wi-Fi together. Mine is iOS v11.1.2 in iPhone 6 Plus. I also met the same issue in some condition. But I think that my cellular network's ISP doesn't do DNS hijacking.

AdGuard's developer said it's because of DNS hijacking. Yesterday, I came back to my home town from another county. I tried to again let my iPhone surf on internet over my Android phone hotspot Wi-Fi. The same ISP... However, the filter of AdGuard DNS server became to work. Is there a difference between the same ISP's cellular network hosts in different counties?

But I still doubt that it's AdGuard Pro's bug. Can you try DNS Override? https://itunes.apple.com/us/app/dns-override-set-dns-for-wi-fi-and-cellular/id1060830093?mt=8 Sorry, its DNS Override feature needs $1.99.

Or do you have another T-Mobile USA cellular network's sim card for Android phone? Please try DNS Changer (No Root - IPv6 - All connections). https://play.google.com/store/apps/details?id=com.frostnerd.dnschanger&hl=zh_TW

You don't need AdGuard for Android. Simply set AdGuard DNS server in DNS Changer (No Root - IPv6 - All connections). AdGuard DNS server: IPv4 addresse 176.103.130.130 176.103.130.131

IPv6 addresses 2a00:5a60::ad1:0ff 2a00:5a60::ad2:0ff

View if ads can be blocked by AdGuard DNS server and then report here. If ads can be blocked by AdGuard DNS server over T-Mobile USA cellular network when using DNS Override on iPhone or DNS Changer (No Root - IPv6 - All connections) on Android phone, we can sure that it's AdGuard Pro's bug.

Thank you very much sincerely!

one can input a URL, and the app would then automatically pull from and update the blacklist according to the contents of the URL?

Every AdGuard user wish these. Not only you, other users also asked about the feature requests. https://github.com/AdguardTeam/AdguardForiOS/issues/50 https://github.com/AdguardTeam/AdguardForiOS/issues/486

Well, we need a better layout of management for AdGuard Pro's blacklist. https://github.com/AdguardTeam/AdguardForiOS/issues/535

AdBlock by FutureMind does better here. The classified groups of filters. Import filters by URLs and choose to save the filter in which group. I wish these features not only for the blacklist of AdGuard Pro for iOS but also for the user filter of AdGuard for Android. Hope that AdGuard team can improve the poor layout of the blacklist's / user filter's management.

ameshkov commented 6 years ago

wouldn't it be easy to simply add a feature wherein instead of manually typing in or copy-pasting blacklist entries, one can input a URL, and the app would then automatically pull from and update the blacklist according to the contents of the URL?

Absolutely, we should provide an "import" feature.

ameshkov commented 6 years ago

I have an idea about how to fix the issue with T-Mobile, but we need help from users. Details are here: https://github.com/AdguardTeam/AdguardForiOS/issues/796