How to Bypass Website Using Mikrotik doh

Configuring DNS over HTTPS (DoH) on MikroTik involves a few steps to enhance privacy and security. Here's a simplified guide:

1. Upgrade RouterOS
  • Ensure your MikroTik device is running RouterOS version 6.46 or later, as DoH support was introduced in this version.

2. Access DNS Settings
  • Navigate to the IP > DNS menu in your MikroTik configuration interface.

3. Enable DoH
  • Add a DoH server, such as Cloudflare's https://cloudflare-dns.com/dns-query or Google's https://dns.google/dns-query. Enable the "Allow Remote Requests" option to let the router handle DNS queries.

4. Verify Certificate
  • Import the necessary SSL certificate to verify the DoH server's authenticity.
# Enable DoH client /ip dns set allow-remote-requests=yes use-doh-server=https://cloudflare-dns.com/dns-query verify-doh-cert=no # Force DNS for all clients (Redirect all DNS requests to the router) /ip firewall nat add chain=dstnat action=redirect to-ports=53 protocol=udp dst-port=53 comment="Force DNS UDP" add chain=dstnat action=redirect to-ports=53 protocol=tcp dst-port=53 comment="Force DNS TCP" # Optional: Bypass DNS for certain networks (example: 192.168.1.0/24) /ip firewall nat add chain=dstnat action=accept src-address=192.168.1.0/24 protocol=udp dst-port=53 comment="Bypass Force DNS for Local LAN" add chain=dstnat action=accept src-address=192.168.1.0/24 protocol=tcp dst-port=53 comment="Bypass Force DNS for Local LAN TCP"
Scroll to top
Code Copied!