2022-12-20 11:52:43 +05:30
|
|
|
# Verify the connection at https://1.1.1.1/help
|
|
|
|
|
2023-06-29 08:31:49 +05:30
|
|
|
# disable doh (temporarily)
|
|
|
|
|
|
|
|
/ip dns set verify-doh-cert=no
|
|
|
|
|
2024-11-29 20:11:34 +05:30
|
|
|
# update the caCertURL depending on what's used at https://1.1.1.1/dns-query
|
2022-12-20 11:52:43 +05:30
|
|
|
|
2024-11-29 20:11:34 +05:30
|
|
|
:local caCertURL
|
|
|
|
:set caCertURL https://cacerts.digicert.com/DigiCertGlobalRootG2.crt.pem
|
|
|
|
|
|
|
|
:local result [ /tool fetch url=$caCertURL dst-path=root-ca-cert.pem as-value ];
|
|
|
|
:do { :delay 2s } while=( $result->"status" != "finished" )
|
|
|
|
|
|
|
|
/certificate remove [find name~"root-ca-cert.pem"]
|
|
|
|
/certificate import file-name=root-ca-cert.pem passphrase=""
|
|
|
|
/file remove root-ca-cert.pem
|
|
|
|
|
|
|
|
/ip dns set use-doh-server=https://1.1.1.1/dns-query verify-doh-cert=yes
|
2022-12-20 11:52:43 +05:30
|
|
|
|
|
|
|
# optional steps
|
2024-11-29 20:11:34 +05:30
|
|
|
/ip dns set servers="1.1.1.1,1.0.0.1"
|
2022-12-20 11:52:43 +05:30
|
|
|
/ip dhcp-client set use-peer-dns=no [find]
|
2023-06-29 08:31:49 +05:30
|
|
|
|
|
|
|
# flush existing cache
|
|
|
|
/ip dns cache flush
|