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
NetRuleRouter Alpha Released to Route Traffic Across Multiple Connections Without Disabling VPN
Developer krox1 has released the first public alpha of NetRuleRouter v0.1.0-alpha.1 for Windows and Linux, a local network policy manager that distributes traffic between primary and secondary connections based on domains, IP ranges, applications, and subnets. The tool emerged from practical issues that intensified after Russian authorities discussed VPN restrictions in March 2026, with operators and platforms later prompting users to disable VPN for domestic services. NetRuleRouter sits on top of existing connections rather than acting as a VPN client or proxy, allowing users to keep corporate VPNs, personal VPNs, and direct internet active simultaneously. It supports seven matching methods including exact domains, wildcard subdomains, CIDR ranges, and application paths, with priority rules to resolve overlaps and built-in leak protection that prevents protected destinations from falling back when the secondary connection drops. The alpha includes diagnostic tracing, preset rule sets for Russia and other regions, import/export capabilities, and a first-run wizard that configures the background service and initial bindings. Limitations around DNS, shared IPs, and brief startup windows are documented, and the project explicitly does not protect against account-level blocks by services such as Anthropic.
Setting Up Nextcloud Talk on TrueNAS with Custom Domain for Private Family Calls
A detailed guide explains how to deploy Nextcloud Talk on a TrueNAS server behind a custom domain to create a self-hosted messaging and calling platform for family use. The author addresses problems with commercial messengers such as VK notifications failing on iOS and Telegram requiring VPN connections. The solution uses HestiaCP on a VPS for reverse proxying, Let's Encrypt SSL certificates, and port forwarding on a home router to reach the TrueNAS instance at 192.168.0.17:30027. Additional steps cover configuring coturn for TURN relay to enable reliable voice and video calls, updating trusted domains in Nextcloud, and disabling router DoS protection. The setup also enables Screen Sharing, reactions, and push notifications while keeping all data under user control.
Aladdin Launches Enterprise CA 3.0 with Kubernetes Support and Fourfold Faster Certificate Issuance
Russian vendor Aladdin has released version 3.0 of its corporate certificate authority product, Aladdin Enterprise CA. The update emphasizes Kubernetes and Deckhouse integration to automate certificate lifecycle management and improve cluster resilience. Mass issuance of file-based certificates is now up to four times faster than in the previous release. The product includes native ACME protocol support for automated SSL certificate deployment and adds centralized security logging with SIEM integration. It is positioned as a drop-in replacement for Microsoft CA that allows migration without service interruption. Additional features include support for RED Database, an English-language interface, and expanded administrative capabilities. The new version is currently undergoing FSTEC Russia certification while version 2.x continues to receive security updates.
Reviving Huawei SANEX9510: Expired Certificates, Zero-Byte Keystore and Lost '@' Symbol Fixed Without Database Restart
A three-day postmortem revealed seven independent failures across four TLS contours in a legacy Huawei SANEX9510 telecom OSS platform that had been offline for ten months. The issues included expired certificates, an empty 0-byte PKCS#12 keystore, a missing '@' character in an encrypted TrustStore password, incompatible PKCS#8 private key encryption formats, and connection leaks to Sybase IQ. All components were restored without rebooting servers, restarting the database, or resetting passwords. The engineer mapped every keystore reference across multiple property files to avoid breaking working segments while fixing others. A final table creation for missing DAS_DIRSIZE metadata resolved a month-old import failure unrelated to the certificate problems.