Skip to content

Instantly share code, notes, and snippets.

@Imprtat
Created July 31, 2023 12:31
Show Gist options
  • Save Imprtat/3015e7c2c440341f77047352949941f1 to your computer and use it in GitHub Desktop.
Save Imprtat/3015e7c2c440341f77047352949941f1 to your computer and use it in GitHub Desktop.
RouterOS Cloudflare DoH
/tool fetch url=https://cacerts.digicert.com/DigiCertGlobalRootCA.crt.pem
/certificate import file-name=DigiCertGlobalRootCA.crt.pem passphrase=””
/ip dns set use-doh-server=https://cloudflare-dns.com/dns-query verify-doh-cert=yes
/ip dns static add address=1.1.1.1 name=cloudflare-dns.com
/ip dns set servers=””
/ip firewall nat add action=redirect chain=dstnat comment=”redirect dns-query to local DNS” dst-port=53 in-interface-list=!WAN protocol=udp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment