mirror of
https://github.com/pothi/mikrotik-scripts.git
synced 2025-07-10 06:34:28 +02:00
Update inline docs; fix how variable is assigned
This commit is contained in:
parent
75ee7e60fd
commit
0b07cdb7ac
1 changed files with 7 additions and 7 deletions
|
@ -6,27 +6,27 @@
|
||||||
:local deviceName
|
:local deviceName
|
||||||
:set nextdnsID "abc123"
|
:set nextdnsID "abc123"
|
||||||
# Avoid spaces or use unicode
|
# Avoid spaces or use unicode
|
||||||
:local deviceName "MikroTik-AX2"
|
:set deviceName "MikroTik-AX2"
|
||||||
|
|
||||||
# disable doh (temporarily)
|
# disable doh (temporarily)
|
||||||
|
|
||||||
/ip dns set verify-doh-cert=no
|
/ip dns set verify-doh-cert=no
|
||||||
|
|
||||||
# Quad9 uses DigiCert like CloudFlare.
|
# NextDNS uses UserTrust ECC cert
|
||||||
:local result [ /tool fetch url=http://crt.usertrust.com/USERTrustECCAddTrustCA.crt dst-path=nextdns.pem as-value ];
|
:local result [ /tool fetch url=http://crt.usertrust.com/USERTrustECCAddTrustCA.crt dst-path=nextdns.pem as-value ];
|
||||||
:do { :delay 2s } while=( $result->"status" != "finished" )
|
:do { :delay 2s } while=( $result->"status" != "finished" )
|
||||||
|
|
||||||
/certificate remove [find name~"nextdns.pem"]
|
/certificate remove [find name~"nextdns"]
|
||||||
/certificate import file-name=nextdns.pem passphrase=""
|
/certificate import file-name=nextdns.pem passphrase=""
|
||||||
/file remove nextdns.pem
|
/file remove nextdns.pem
|
||||||
|
|
||||||
/ip dns
|
/ip dns
|
||||||
static remove [find name="dns.quad9.net"]
|
static remove [find name="dns.nextdns.io"]
|
||||||
static add name=dns.nextdns.io address=45.90.28.0 type=A
|
static add name=dns.nextdns.io address=45.90.28.0 type=A
|
||||||
static add name=dns.nextdns.io address=45.90.30.0 type=A
|
static add name=dns.nextdns.io address=45.90.30.0 type=A
|
||||||
static add name=dns.nextdns.io address=2a07:a8c0:: type=AAAA
|
static add name=dns.nextdns.io address=2a07:a8c0:: type=AAAA
|
||||||
static add name=dns.nextdns.io address=2a07:a8c1:: type=AAAA
|
static add name=dns.nextdns.io address=2a07:a8c1:: type=AAAA
|
||||||
|
|
||||||
|
# Configure Device Name with NextDNS, if exists.
|
||||||
:if ( $deviceName == "" ) do={
|
:if ( $deviceName == "" ) do={
|
||||||
set use-doh-server="https://dns.nextdns.io/$nextdnsID" verify-doh-cert=yes
|
set use-doh-server="https://dns.nextdns.io/$nextdnsID" verify-doh-cert=yes
|
||||||
} else={
|
} else={
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
# optional steps
|
# optional steps
|
||||||
/ip dns set servers=""
|
# /ip dns set servers=""
|
||||||
/ip dhcp-client set use-peer-dns=no [find]
|
# /ip dhcp-client set use-peer-dns=no [find]
|
||||||
|
|
||||||
# flush existing cache
|
# flush existing cache
|
||||||
/ip dns cache flush
|
/ip dns cache flush
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue