Community discussions

MikroTik App
 
mdj2000
just joined
Topic Author
Posts: 23
Joined: Mon Aug 22, 2022 5:50 pm
Location: Italy

Scheduled script for DNS certificate update

Tue Oct 10, 2023 9:38 pm

Hello, I created this script, but it doesn't work correctly for me. It is set to run every 30 days to update the certificates used for DoH DNS.

Where is the error? Thank you
#set ip dns server
/ip dns set servers=8.8.8.8,8.8.4.4
#set disable certificate DNS over HTTPS (DoH)
/ip dns set verify-doh-cert=no

#fetch pki certificate google certificate
/tool fetch url=https://pki.goog/roots.pem
#fetch pki certificate cloudflare
/tool fetch url=https://curl.se/ca/cacert.pem
#certificate import google
/certificate import file-name=roots.pem passphrase=""
#certificate import cloudflare
/certificate import file-name=cacert.pem passphrase=""

#set certificate DNS over HTTPS (DoH)
/ip dns set use-doh-server=https://dns.google/dns--query
#optional server if google not function ... /ip dns set use-doh-server=https://cloudflare-dns.com/dns-query
/ip dns set verify-doh-cert=yes

#no set ip dns
/ip dns set servers=""

:log info "script complete - obtain root CA certificate (google+cloudflare)

Who is online

Users browsing this forum: No registered users and 5 guests