What’s it for?
You show up at a customer’s site: the router is managed by the operator, the DHCP too, and you can’t touch anything. But they ask you to block a few sites, or to resolve the internal names, or simply to see who’s asking for what. And half the devices, cameras and smart TVs leading the way, don’t even ask the router for DNS: they have 8.8.8.8 written inside.
The solution is a MikroTik dropped in the middle like a piece of cable, in bridge between the customer’s network and their router. To everyone it’s invisible: same addresses, same gateway, same DHCP. But every DNS request that goes through it, toward any server, it intercepts and answers itself.
The trick is in two rules: one in the bridge NAT, which brings the request “up” to the router, and one in the regular NAT, which hands it to the router’s DNS. You need both, and in the lab I tried what happens when one is missing.

Step 1: how do I put the MikroTik in bridge?
A bridge with two ports: ether1 toward the customer’s router, ether2 toward the network (the switch, the devices).
/interface bridge add name=br-trasp
/interface bridge port
add bridge=br-trasp interface=ether1
add bridge=br-trasp interface=ether2
/ip dhcp-client add interface=br-trasp
The DHCP client on the bridge is for the MikroTik itself: it gets an address from the customer’s network, the gateway and the operator router’s DNS. That way it has internet to resolve the names it doesn’t know. Nothing changes for the PCs: they keep getting their address from the router as before.
⚠️ Warning: if you connect to the MikroTik from ether1 or ether2, putting them in the bridge disconnects you for a few seconds. Set everything up from another port, or from WinBox over MAC.
Step 2: how do I turn on the router’s DNS?
/ip dns set allow-remote-requests=yes
Now the MikroTik answers the DNS requests that reach it. If you use the firewall from the Basic hardening of a MikroTik router, add the bridge to the LAN list, otherwise the requests get dropped on input:
/interface list member add list=LAN interface=br-trasp
Step 3: why isn’t the regular NAT enough?
The first instinct is the usual redirect rule:
/ip firewall nat
add chain=dstnat protocol=udp dst-port=53 action=redirect to-ports=53
add chain=dstnat protocol=tcp dst-port=53 action=redirect to-ports=53
Add it, we need it. But on its own it does nothing: in the lab its counters stayed at zero. Traffic that crosses a bridge doesn’t go up to the IP level, so the IP firewall doesn’t see it at all: the bridge is the piece of cable, and the cable doesn’t look inside the packets.
Step 4: how do I bring the DNS to the router with the bridge NAT?
The bridge NAT works inside the bridge, on the frames. The redirect action does one thing only: instead of passing the frame from one port to another, it hands it to the router itself.
/interface bridge nat
add chain=dstnat in-interface=ether2 mac-protocol=ip ip-protocol=udp dst-port=53 action=redirect
add chain=dstnat in-interface=ether2 mac-protocol=ip ip-protocol=tcp dst-port=53 action=redirect
in-interface=ether2: only the requests coming from the customer’s network; traffic from the operator router’s side passes with no snags;mac-protocol=ipis needed to be able to useip-protocolanddst-port;- UDP and TCP: large DNS responses travel over TCP.
Now the request reaches the router, the NAT from step 3 sees it and sends it to the MikroTik’s DNS. The two rules run a relay: the bridge NAT brings the packet to the router, the IP NAT hands it to the DNS. The bridge NAT actions are listed in the MikroTik manual: Bridging and Switching.
And if you remove the step 3 rule? In the lab the request reaches the router, but it’s addressed to 8.8.8.8: the router forwards it to Google, as it would with any other packet, and Google answers. You really do need the pair.
Step 5: how do I check it works?
Add a name that exists only on the MikroTik:
/ip dns static add name=prova.dojo.lan address=10.9.9.9
Then, from a PC on the network, ask for it on purpose from an external DNS:
host prova.dojo.lan 8.8.8.8
nslookup prova.dojo.lan 1.1.1.1
Google doesn’t know what prova.dojo.lan is. If the answer is 10.9.9.9, the MikroTik answered. In the lab, before the rules: “not found”. After: prova.dojo.lan has address 10.9.9.9, asking 8.8.8.8, 1.1.1.1 and 9.9.9.9, over TCP too. On the router the counters go up:
/interface bridge nat print stats
/ip firewall nat print stats
Step 6: and now what do I do with it?
The DNS for the whole network goes through you. For example, to block a site and all its subdomains:
/ip dns static add name=tiktok.com type=NXDOMAIN match-subdomain=yes
Whoever asks any DNS for www.tiktok.com is told it doesn’t exist. Tested in the lab, both toward 8.8.8.8 and toward 1.1.1.1.
The same pattern works for other services: you change the port in the two rules and bring to the router whatever you need.
What do I check before putting it in production?
- encrypted DNS can’t be intercepted: browsers and phones that use DNS over HTTPS (DoH) or DNS over TLS (port 853) go through anyway. For serious filtering those need to be closed too: how to do it is in the howto on how to block DNS over HTTPS and DNS over TLS;
- if the MikroTik shuts off, the bridge breaks and the network is left with no link to the router: use it where you can power it well;
- all DNS traffic goes through the CPU, the rest doesn’t. For an office it’s nothing;
- the MikroTik is on the customer’s network with its own address and DNS open: protect it with the Basic hardening of a MikroTik router.
Tested in the lab on PNETLab with a CHR running RouterOS 7.24.5 (stable) in bridge between a Debian 12 client and another router with DHCP: IP NAT only (counters at zero), bridge NAT plus IP NAT (the MikroTik answering toward 8.8.8.8, 1.1.1.1 and 9.9.9.9, over UDP and TCP), bridge NAT only (Google answering), blocking a domain with type=NXDOMAIN.
Frequently asked questions
How do I intercept DNS with a MikroTik in bridge?
With two rules: in the bridge NAT (/interface bridge nat) a redirect for port 53, which brings the request to the router, and in the IP NAT a redirect toward port 53, which hands it to the MikroTik’s DNS. The DNS has to be turned on with allow-remote-requests=yes.
Why doesn’t the firewall NAT see the bridged traffic?
Because traffic crossing a bridge stays at the Ethernet level and doesn’t go through the IP firewall. The bridge NAT’s redirect brings it up to the router, and from there the IP NAT sees it.
Do I need use-ip-firewall?
No. With the bridge NAT’s redirect only the DNS requests go up to the router; everything else crosses the bridge without passing through the IP firewall.
Does it work with encrypted DNS too?
No: DNS over HTTPS and DNS over TLS don’t use port 53 and can’t be read. They can be blocked though: port 853, an address list of the DoH servers and Firefox’s canary domain, as explained in the howto on how to block DNS over HTTPS and DNS over TLS.



