Repository navigation
Changelog
History of the scheme and the scripts. The repository CHANGELOG.md is the source of truth and follows Keep a Changelog 2.0.0; this page is the working summary — what changed for someone running the scheme, and why it mattered.
-
Failover was blocked in
probeMode "resolve". Before switching, the monitor still probed the fallback over DNS-JSON. A self-hosted endpoint answers400to that request, soprobeBnever becameokand a dead primary stayed in place while a working reserve sat idle. In resolve mode the switch now happens directly and is verified by:resolveafter it, with rollback if the new endpoint answers badly. - The fallback probe in JSON mode now reports
substitutedtoo, like the primary probe.
- New troubleshooting section: running a reserve endpoint on a separate host, including the
dnsdist 2.xpitfall — its plain-HTTP DoH listener is HTTP/2-only, so nginx cannot proxy to it andh2=falseis not a valid option.
Release: v0.4.2 · notes: release-notes-v0.4.2
-
probeModein the health monitor:"json"(default) or"resolve". A self-hosted DoH endpoint serves wire format and has no DNS-JSON API, so the JSON probe reported a healthy primary asbad-statusand moved the router onto a public fallback — the very path where answers get substituted."resolve"judges liveness by the quality of live answers, with no external request. -
PyPI package
mikrotik-doh-failover: the Zabbix tools fromzabbix/are installable and appear asdoh-zabbix-setupanddoh-zabbix-collector. The RouterOS side stays copy-by-hand — a router configuration is reviewed, not installed. - Troubleshooting section on network-level DoH substitution, with a one-minute way to tell it from an outage.
- The probe no longer trusts
"Status":0. A substituting network returns a syntactically perfect answer with a stub address, so the payload is checked againststubPrefixesand reported assubstituted. -
STUBis declared only after one cache flush and a re-check. A stub cached while the path was intercepted stayed until TTL and looked permanent; today the monitor logsSTUB_CLEAREDand returns tohealthy. - The
STUBmessage says what it means: the path is intercepted, changing the resolver alone will not help.
- Importing the Zabbix modules required
ZBX_USER/ZBX_PASSWORD: the check ran at module level. Credentials are now resolved inmain(). - A missing
zabbix_senderproduced a traceback. Now it names the binary and suggests the package to install; the path can be overridden withZBX_SENDER. - Example data in the Zabbix part used real addresses and site names of one deployment; replaced with neutral examples.
- Every
/tool fetchin the probe carriesduration=5s, so a hung endpoint cannot block a scheduler run past its slot. - The tertiary endpoint is verified the same way as the secondary before switching.
- The attempt counter is consistent across the chain; recovery climbs from plain DNS back to DoH instead of stopping at the last resort.
- In-memory probes (
as-value output=user): no temp files in/file, no cleanup races. - Ordered chain: primary → secondary → tertiary (optional) → plain DNS (optional, logged
PRIVACY DEGRADED). - New
plainstate with a return path to the primary.
- Content-aware verdicts: an answer is judged by what it contains, not by the fact that an address came back.
-
CLOCK_INVALIDstate: a wrong clock cannot validate certificates, and saying so beats a misleading "DoH down".
- Filtering resolvers (Cloudflare Family,
1.1.1.3) are no longer the default: they answer the stub pair for filtered names by design. -
device-mode=homeis detected up front — fetch and the scheduler are unavailable there, so the monitor reportsMANUAL-ONLYinstead of failing silently.
First working scheme: one verified DoH upstream, a second as failover, a health check that compares answers instead of trusting "an IP came back".
Wiki for mikrotik-doh-failover 0.4.1 (2026-10-28, RouterOS 7.23.1 / 7.24.5).
The repository is the source of truth: when a page here disagrees with
README.md or
docs/, the
repository wins. Found a wrong statement? Open an issue with the command you ran
and its output — a claim without a measurement is not accepted.
mikrotik-doh-failover — wiki for version 0.4.3
- Getting started
- Configuration
- How it works — full flowchart
- Health monitor
- Verification
- Troubleshooting
- Changelog
- Upgrading from 0.1.0
- Zabbix monitoring
Package: PyPI — mikrotik-doh-failover · Repository: paulmann/mikrotik-doh-failover · README · Releases · Changelog