GithubHelp home page GithubHelp logo

paulmillr / encrypted-dns Goto Github PK

View Code? Open in Web Editor NEW
2.9K 55.0 305.0 258 KB

DNS over HTTPS config profiles for iOS & macOS

Home Page: https://paulmillr.com/posts/encrypted-dns/

License: The Unlicense

dns over https tls cloudflare google quad9 opendns rfc8484 rfc7858 encrypted-dns configuration-profile mobileconfig ios macos

encrypted-dns's Introduction

English | 简体中文 | 繁體中文

encrypted-dns-configs

Configuration profiles for DNS over HTTPS and DNS over TLS. Check out the article for more info: paulmillr.com/posts/encrypted-dns/ and info about contributing a new profile.

Caveats

DoH seems to work faster & better than DoT judging from the Google's article.

Starting from iOS & iPadOS 15.5, Wi-Fi captive portals in cafes, hotels, airports are exempted by Apple from eDNS rules; to simplify authentication. This is good news. There are still some other issues; we can't fix them, only Apple can:

If you need even more privacy, check out encrypted-dns over TOR.

Providers

Censorship=yes means the profile will not send true information about hostname=IP relation for some hosts.

Name Region Censorship Notes Install (Signed - Recommended) Install (unsigned) button
360 Security DNS 🇨🇳 Yes Operated by 360 Digital Security Group HTTPS HTTPS
AdGuard DNS Default 🇷🇺 Yes Operated by AdGuard Software Ltd. Blocks ads, tracking & phishing HTTPS, TLS HTTPS, TLS
AdGuard DNS Family Protection 🇷🇺 Yes Operated by AdGuard Software Ltd. Blocks Default + malware & adult content HTTPS, TLS HTTPS, TLS
AdGuard DNS Non-filtering 🇷🇺 No Operated by AdGuard Software Ltd. Non-filtering HTTPS, TLS HTTPS, TLS
Alekberg Encrypted DNS 🇳🇱 No Independent HTTPS HTTPS
Aliyun Public DNS 🇨🇳 No Operated by Alibaba Cloud Ltd. HTTPS, TLS HTTPS, TLS
Archuser.org PubHole 🇺🇸 Yes Independent. Blocks ads, tracking, and supports OpenNIC Domains. HTTPS, TLS
BlahDNS CDN Filtered 🇺🇸 Yes Independent. Blocks ads, tracking & malware HTTPS HTTPS
BlahDNS CDN Unfiltered 🇺🇸 No Independent. Non-filtering HTTPS HTTPS
BlahDNS Finland 🇫🇮 Yes Independent. Blocks ads, tracking & malware HTTPS HTTPS
BlahDNS Germany 🇩🇪 Yes Independent. Blocks ads, tracking & malware HTTPS HTTPS
BlahDNS Japan 🇯🇵 Yes Independent. Blocks ads, tracking & malware HTTPS HTTPS
BlahDNS Singapore 🇸🇬 Yes Independent. Blocks ads, tracking & malware HTTPS HTTPS
BlahDNS Switzerland 🇨🇭 Yes Independent. Blocks ads, tracking & malware TLS TLS
Canadian Shield Private 🇨🇦 No Operated by the Canadian Internet Registration Authority (CIRA) HTTPS, TLS HTTPS, TLS
Canadian Shield Protected 🇨🇦 Yes Operated by the Canadian Internet Registration Authority (CIRA). Blocks malware & phishing HTTPS, TLS HTTPS, TLS
Canadian Shield Family 🇨🇦 Yes Operated by the Canadian Internet Registration Authority (CIRA). Blocks malware, phishing & adult content HTTPS, TLS HTTPS, TLS
Cloudflare 1.1.1.1 🇺🇸 No Operated by Cloudflare Inc. HTTPS, TLS HTTPS, TLS
Cloudflare 1.1.1.1 Security 🇺🇸 Yes Operated by Cloudflare Inc. Blocks malware & phishing HTTPS HTTPS
Cloudflare 1.1.1.1 Family 🇺🇸 Yes Operated by Cloudflare Inc. Blocks malware, phishing & adult content HTTPS HTTPS
DNSPod Public DNS 🇨🇳 No Operated by DNSPod Inc., a Tencent Cloud Company HTTPS, TLS HTTPS, TLS
Google Public DNS 🇺🇸 No Operated by Google LLC HTTPS, TLS HTTPS, TLS
keweonDNS 🇩🇪 No Operated by Aviontex. Blocks ads & tracking HTTPS, TLS HTTPS, TLS
Mullvad DNS 🇸🇪 Yes Operated by Mullvad VPN AB HTTPS HTTPS
Mullvad DNS Adblock 🇸🇪 Yes Operated by Mullvad VPN AB. Blocks ads & tracking HTTPS HTTPS
OpenDNS Standard 🇺🇸 No Operated by Cisco OpenDNS LLC HTTPS HTTPS
OpenDNS FamilyShield 🇺🇸 Yes Operated by Cisco OpenDNS LLC. Blocks malware & adult content HTTPS HTTPS
Quad9 🇨🇭 Yes Operated by Quad9 Foundation. Blocks malware HTTPS, TLS HTTPS, TLS
Quad9 w/ ECS 🇨🇭 Yes Operated by Quad9 Foundation. Supports ECS. Blocks malware HTTPS, TLS HTTPS, TLS
Tiarap 🇸🇬 🇺🇸 Yes Operated by Tiarap Inc. Blocks ads, tracking, phising & malware HTTPS, TLS HTTPS, TLS

Installation

To make settings work across all apps in iOS, iPadOS & macOS, you'll need to install configuration profile. This profile would tell operating system to use DoH / DoT. Note: it's not enough to simply set server IPs in System Preferences — you need to install a profile.

iOS / iPadOS: Open the mobileconfig file in GitHub by using Safari (other browsers will just download the file and won't ask for installation), and then click/tap on "Allow" button. The profile should download. Go to System Settings => General => VPN, DNS & Device Management, select downloaded profile and tap the "Install" button.

macOS (official docs):

  1. Download and save the profile. After save, rename it to be in format: NAME.mobileconfig, not NAME.txt, or so

  2. Choose Apple menu > System Settings, click Privacy and Security in the sidebar, then click Profiles on the right. (You may need to scroll down.) You may be asked to supply your password or other information during installation.

  3. In the Downloaded section, double-click the profile.

  4. Review the profile contents then click Continue, Install or Enroll to install the profile.

    If an earlier version of a profile is already installed on your Mac, the settings in the updated version replace the previous ones.

Scope

There seems to be an additional option that allows to use system-wide profiles. To try it, add this to mobileconfig file:

<key>PayloadScope</key>
<string>System</string>

Signed Profiles

In the signed folder we have signed versions of the profiles in this repository. These profiles have been signed by @Xernium so that when you install the profiles, they will have a verified check box on the installation screen. It also ensures that these profiles have not been tampered with. However, since they were signed by a third party, they may lag behind their unsigned counterparts a little. The signature is valid until 2024-11-30

Previous signature by: @Candygoblen123, replaced at 2023-11-29

To verify resolver IPs and hostnames, compare mobileconfig files to their documentation URLs. Internal workings of the profiles are described on developer.apple.com. In order to verify signed mobileconfigs, you will need to download them to your computer and open them in a text editor, because signing profiles makes GitHub think that they are binary files.

Contributing a new profile

Profiles are basically text files. Copy an existing one and change its UUID, make sure you update README with new profile's info.

In addition to generating online, there are many other ways to generate a random UUID:

  • Press F12 to open DevTools in the browser, run this code in the console
crypto.randomUUID();
  • Run these commands in the macOS / Linux terminal
# Works both in macOS & Linux
uuidgen

# Works in Linux
cat /proc/sys/kernel/random/uuid
  • Run this cmdlet in Powershell
New-Guid

encrypted-dns's People

Contributors

bamf2077 avatar candygoblen123 avatar doamatto avatar franktca avatar jackjyq avatar karanfil avatar kokial avatar martinholovsky avatar michaeldavie avatar mohd-akram avatar mucke5 avatar ouyangmland avatar paulmillr avatar readycool avatar salebab avatar schalkms avatar silentely avatar songlinjian avatar sunknudsen avatar t0rzz avatar thttg avatar xernium avatar zecanard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

encrypted-dns's Issues

Feature Suggest: Make it on-demand

My home WIFI have a ad-blocked DNS powered by pi-hole. But this profile force the DNS all the time. Is it possible to make it exclude certain SSID, to use the DNS from DHCP. And use the profile setting for those WIFI not on the list and cellular.
https://emm.how/t/ios-14-changes-in-configuration-profiles/1285
https://thomas-witt.com/auto-connect-your-ios-device-to-a-vpn-when-joining-an-unknown-wifi-d1df8100c4ba
OnDemand key seems do something similar, but how to combine with the DNS profile?

How to check?

Hello,
First of all thanks for your contribution.

I installed the profile. Is there a way to check if DNS encryption is working? I am asking that also because I have noticed a warning next to the WiFi network name:

this network is blocking DNS encrypted traffic

Thanks for helping,
Dan

[question] iPadOS support

Hi,
any idea if this could work in iPadOS, and not just iOS?
There is no Profile section under Settings/General in iPadOS 14.3
thanks

Need Help with iOS 14 DNS

Hello, this request might be slightly offtopic, but I am pulling out my hair with iOS 14 encrypted DNS and maybe someone her ecan help me. So the question is if it is possible to extend your profiles with a second, local and most importantly NON ENCRYPTED DNS server? Problem is that iOS 14 seems to totally ignore such unencrypted servers if there an encrypted one (here: Cloudflare) is available. So the idea is to construct a mobileconfig which instructs iOS to use this second DNS as well, but only for certain domains. Is this possible at all?

Chrome exempting itself form macOS settings

In blog post Firefox is mentioned but not Chrome.

It might then come as a surprise to some users that Chrome will exempt itself from global settings on macOS (of course) and will use its own DNS-over-https. If someone would like to setup DoH on Chrome this is how to do it:

Go to Settings-> Privacy and Security --> Security and scroll down to Use Secure DNS. Check this option and select predefined server (Google, Cloudflare) or use your own.

Chrome 87 on Big Sur 11.0.1

Mixing DNS servers ?

Hello,

Is it possible to mix DNS configurations in one single mobileconfig ?

For example, can I define a Cloudflare + Quad9 DoH for redundancy purposes ?

Thanks.

Does iOS support only one DoH config?

iOS 14.3 on iPhone 8
When I installed a new DoH config the existed one disappeared. I want to know whether the system support only ONE DoH setting? Thank you.

Hotspot login - captive.apple.com

Is there a way for the https over dns to bypass certain links? Seems the certain captive.apple.com hotpot login pages do not load when dns over https is active. However - once logged in - I found that I can reactivate https over dns and continue browsing over the hotspot. Just can’t use to connect on the hotspot landing page.

I am the DNS

Hello author, I would like to ask how to get the signature, I also want to get DNS, purr purr.

wrong link in readme

In readme.md, the link to AdGuard No Filter TLS actually points to adguard-nofilter-https.mobileconfig, but it should point to adguard-nofilter-tls.mobileconfig

CloudFlare for team

I used your main config for Cloudflare

and I tried to change the IP's for Cloudflare team instead of Cloudflare public IPs.
I installed the profile on iOS 14.5, query are resolved but somehow not filtered

(I have a block list on Cloudflare for team and I can access blocked domain)

im not sure what Im missing

Please add Nextdns TLS/HTTPS with custom id profiles

Because their profiles suck, don’t even import and don’t have support for DOH/DOT.

Thankfully macOS can just add the VPN profile from the macOS app and connect from Network setting without the app after but I don’t think iOS is as lucky.

Plus would be cool if I could edit the profile myself and choose preferred DNS server since their 2nd backup one is usually like 2x as fast or more — though I don’t know if that would work with their custom ID DNS profile for dashboard/filters and whatnot.

DoH over non standard port

Unfortunately I need to create a profile for an Inhouse (non-public) DoH proxy. Creating the profile was quite easy by modifying the google profile provided here, but I stuck at the point that I need to run the DoH proxyy on another port than 443.
Can I define the port somewhere in profile?

Blog post doesn't take into account TLS Server Name Indication means middlemen can still see hostnames

With Encrypted DNS, the middlemen will only see 91.198.174.192 — which is an IP of wikipedia.org. Hold on, there’s a nice detail. Ipinfo.org tells us there are at least 19 domain names associated with this IP! In fact, you could be visiting invoker.com — which has the same IP today. The ISP would not know the difference.

The ISP will be able to (with a bit more difficulty) see the TLS ALPN SNI hostname sent plaintext, which all major browsers and some clients will send, however it is still correct the DNS itself would not be susceptible.

cloudflare-tls.mobileconfig ServerName should be one.one.one.one

https://developer.apple.com/documentation/devicemanagement/dnssettings/dnssettings

If no ServerAddresses are provided, the hostname will be used to determine the server addresses. This key must be present only if the DNSProtocol is TLS.

The ServerName string used is cloudflare-dns.com which is in the X509v3 Subject Alternative Name of the certificate, but resolves to web servers for Cloudflare's DNS. The ServerName should probably be one.one.one.one which resolves to the actual DNS servers.

some problem

After removing the description file, there is still a dns over https item in the network settings

/etc/resolver configuration not working

When this profile is enabled on my mac, this configuration file in /etc/resolver/docker is not working:

#/etc/resolver/docker

nameserver 127.0.0.1
port 19322 

Are there any change can I make in the profile to make it works?

Need for system-wide profile

In Mac, Safari uses the encrypted dns, all other apps like terminal and App Store use the unencrypted dns server from network settings.
Could you please create a profile that uses system-wide encrypted dns?

Add a Warning about iCloud private Relay.

Hello @paulmillr
It can be interesting to add a warning, that iCloud private relay redirect DNS query AND only DNS query of Safari (for now).

So for those who use it they must continue to install profile for DNS query of other APP and Warning them if they use it with profile of DNS who do Adblock the Adblock capability will not work on safari.

Censorship?

Hello,
can you please advise what does censorship imply? This is not clear to me.
Thanks,
Dan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.