Building Resilient DoH Failover on MikroTik RouterOS to Handle Unreachable Cloudflare Responses
A branch office network suddenly stopped loading certain pages such as the Tailwind CSS CDN build that had worked reliably for weeks, while the rest of the internet remained accessible. Investigation on the MikroTik router revealed that :resolve returned valid addresses, DoH responded with Status:0, and the health monitor reported the upstream as healthy, yet clients experienced timeouts.
The root cause was two specific IP addresses returned by Cloudflare: 8.6.112.0 and 8.47.69.0. These were legitimate responses, but no route existed from the affected network segment to those prefixes. Standard resolver health checks that only verify whether an IP was received cannot detect this class of failure.
Initial DoH Deployment and Its Limitations
By default, RouterOS routes local DNS queries in plaintext toward the provider. Enabling DoH required a single command: /ip dns set use-doh-server=... verify-doh-cert=yes. The administrator selected the Cloudflare Family filtering resolver and initially considered the task complete.
Within days, reports arrived from the branch. Disabling DoH and testing plain DNS produced identical addresses, confirming the issue was not filtering but reachability. Client-side verification using curl --resolve demonstrated that the same IP worked from the main gateway yet timed out from the branch.
Requirements and RouterOS Constraints
The administrator defined three core requirements: all router-to-upstream traffic must use HTTPS with certificate validation, local clients must be forced through the router resolver, and automatic failover to a secondary DoH endpoint must occur on failure with automatic return on recovery.
RouterOS natively supports only one active DoH upstream. The often-recommended /ip dns static-server type=doh syntax does not exist in current versions. Bootstrap servers listed under servers= are used solely for initial name resolution of the DoH hostname and are not treated as fallback resolvers when DoH fails.
Health Monitor Evolution and Key Fixes
- Version 0.1.0 incorrectly accepted any IP-typed response, including the unreachable Cloudflare pair.
- Version 0.2.0 introduced content validation against known stub prefixes and switched to out-of-band HTTPS JSON probes to avoid disrupting active DoH sessions.
- Later versions added dual-threshold logic (failureThreshold=2, recoveryThreshold=2) to implement hysteresis and prevent flapping.
- Clock validation rejects dates outside 2025-2035 because an invalid system time breaks certificate verification and mimics upstream failure.
Static DNS entries were added for both primary and secondary DoH hostnames plus dns.google bootstrap addresses to break circular dependencies. The trust anchor SSL.com TLS ECC Root CA 2022 had to be imported because the built-in trust store does not cover the Cloudflare chain.
Current Architecture
The production configuration maintains four ordered stages: primary DoH, secondary DoH, optional tertiary DoH, and optional plain DNS as last resort. Only one stage is active at any time due to RouterOS limitations. The monitor script stores state in global variables, logs only on transitions, and performs pre-switch validation of the candidate endpoint plus post-switch verification before finalizing the change.
Testing confirmed that route injection or static hostname-to-reachable-IP mappings were the only effective remedies; merely changing the resolver brand never resolved the unreachable-prefix problem.
Related articles
Former Smolensk Digital Development Minister Andrey Rudometkin Charged with Large-Scale Fraud and Abuse of Office
Andrey Rudometkin, who served as head of the Ministry of Digital Development of Smolensk Oblast from 2023 until his dismissal in October 2025, now faces criminal charges including fraud on an especially large scale and multiple counts of exceeding official authority. The regional Ministry of Digital Development is listed as the injured party in the case. Prosecutors allege two episodes of power abuse, one committed as part of a group and motivated by personal gain, along with fraud under Part 4 of Article 159 of the Russian Criminal Code. Four individuals are named in the proceedings, including former information security department head Artem Kalugin, who is accused of abuse of office, and two additional defendants charged with large-scale fraud. Rudometkin has remained in custody since late 2025 despite repeated defense requests for release citing his three minor children and difficult family finances. The Smolensk court is scheduled to begin hearings on the case in the near future.
Minpromtorg Demands 138.97 Million Rubles in Penalties from ZNTC for Delays in 130 nm Russian Lithograph Project
The Russian Ministry of Industry and Trade has issued a claim against the Zelenograd Nanotechnology Center for 138.97 million rubles in penalties over missed deadlines in the development of a domestic 130 nm lithography system. The 5.55 billion ruble state contract was signed in December 2021 and requires completion by the end of 2026. The third stage, originally due on 31 March 2024, was only submitted in July, with acceptance signed in August. Company head Anatoly Kovalev attributed the delay to sanctions that complicated cooperation with foreign suppliers. Despite the penalty claim, the project is still expected to finish on schedule, with serial equipment deliveries planned for 2027. The stage included production of two 193 nm excimer laser prototypes, photomasks, test structures, and an objective measurement stand.
Cloud4U Webinar Details Migration to On-Premises Microsoft Exchange Server Including Email, Calendars and Infrastructure Setup
Cloud4U is hosting a webinar on November 20 at 12:00 MSK focused on migrating corporate email systems to a self-hosted Microsoft Exchange server. The session covers end-to-end planning from initial preparation and pilot testing through full data transfer and final cutover. Participants will learn practical methods for moving messages and calendars while maintaining delivery reliability and avoiding spam folder placement. Specific tools such as imapsync and PST files are examined along with strategies for handling duplicate messages during repeated sync passes. The webinar also addresses why simply updating MX records is insufficient and explains the correct configuration of SPF, DKIM and DMARC records. Additional topics include calendar migration via ICS files, limitations with active meetings, and post-migration verification steps before decommissioning the legacy system.
MTS Expands Global Access Service to Most Tariffs for ChatGPT, Netflix and Other Foreign Platforms
MTS has broadened availability of its Global Access service, which enables subscribers to reach ChatGPT, Claude, Netflix, Spotify and similar overseas platforms without using a VPN. The option is now offered on the majority of current and archived tariff plans, with the exception of Membrana, MTS Junior and MTS Junior+. It remains incompatible with Membrana, Safe Childhood and Safe Internet add-ons. Global Access functions exclusively over the MTS mobile network and requires no additional applications. Supported platforms also include Strava and Ticketmaster. The service is positioned for resources unavailable in Russia but not blocked by Roskomnadzor. New users receive seven free days, after which the monthly fee is 249 rubles, while TOP and TOP+ tariffs include it at no extra cost.