Skip to content

Instantly share code, notes, and snippets.

Last active March 5, 2024 20:30
Show Gist options
  • Save soderlind/6a440cd3c8e017444097cf2c89cc301d to your computer and use it in GitHub Desktop.
Save soderlind/6a440cd3c8e017444097cf2c89cc301d to your computer and use it in GitHub Desktop.
macOS DoH! (DNS over HTTPS) using cloudflared
1) Install cloudflared using homebrew:
brew install cloudflare/cloudflare/cloudflared
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content
proxy-dns: true
3) Activate cloudflared as a service
sudo cloudflared service install
4) Test
dig +short @ AA
5) If OK, change DNS on your mac to (System Preferences->Network->Advanced->DNS)
Copy link

@V33m — In that case, all I really needed to do was step 3. Thanks!

How do you personally feel about it? Would you rather keep for normal internet activities and then switch it up for VPN use, or just go with for everything to take advantage of its performance?

Copy link

V33m commented Jul 19, 2019

It's difficult to say the policies Cloudfare are going with. They have an agreement with Mozilla where they limit the logged data and data retention for Firefox users which enable DOH and are using DNS I don't think the limited logging policy is the case for DNS /

I advice you to setup different DOH servers for different cases/activities. Here is a list of some possible DOH servers:

Copy link

;; connection timed out; no servers could be reached

When I use dig +short @ AA

Copy link

New Issue: Tunnelblick will only update the WiFi DNS, not the Ethernet DNS.

I've set the priority to Ethernet-first in the Mac settings, turned off WiFi, and even set it to inactive, but Tunnelblick will not switch to Ethernet.

Is there a way to alter Tunnelblick's network priority or more ideally, have it interact with Ethernet only?

Copy link

hzbd commented Oct 6, 2019

Just a new open doh&dot service:

Copy link for iOS/iPadOS

Currently working on macOS app. :)

Copy link

Works for me with config like:

  enabled: true
  port: 53

Copy link

Have a typo.

/usr/local/etc/cloudflared/config.yml is the correct file. Drop the a.

Should be:

logDirectory: /var/log/cloudflared

proxy-dns: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment