Skip to content

Instantly share code, notes, and snippets.

@SHSharkar
Created November 30, 2021 17:56
Show Gist options
  • Save SHSharkar/f18e62d76af2a2ed4cccfbdb9e9d3941 to your computer and use it in GitHub Desktop.
Save SHSharkar/f18e62d76af2a2ed4cccfbdb9e9d3941 to your computer and use it in GitHub Desktop.
DNS over HTTPS (DoH) - MikroTik

Setup DNS over HTTPS (DoH) - MikroTik Router

Login to MikroTik Router, Open the Terminal, and execute the following commands.

For demonstration, Cloudflare's 1.1.1.1 was used. It can change to any other DNS provider that supports DoH.

/ip dns set servers=1.1.1.1,1.0.0.1
/system ntp client set enabled=yes server-dns-names=time.cloudflare.com
/tool fetch url=https://curl.se/ca/cacert.pem
/certificate import file-name=cacert.pem passphrase=""
/ip dns set use-doh-server=https://1.1.1.1/dns-query verify-doh-cert=yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment