RouterOS 7
/ip/dns/ set servers=9.9.9.9,149.112.112.112
/tool/fetch mode=https url="https://cacerts.digicert.com/DigiCertGlobalG3TLSECCSHA3842020CA1-1.crt.pem"/certificate/import file-name=DigiCertGlobalG3TLSECCSHA3842020CA1-1.crt.pem name=DigiCertGlobalG3TLSECCSHA3842020CA1-1.crt
/ip/dns/ set use-doh-server=https://dns.quad9.net/dns-query verify-doh-cert=yes allow-remote-requests=yes
/tool/sniffer/quick port=53,443 ip-address=9.9.9.9,149.112.112.112
https://docs.quad9.net/Setup_Guides/Open-Source_Routers/MikroTik_RouterOS_%28Encrypted%29/