---
title: Mikrotik: NAT General Rules
slug: legacy/mikrotik-nat-general-rules
description: Learn how to configure NAT rules on your Mikrotik router to efficiently redirect DNS queries to designated datacenters.

docTags: 
createdAt: 2024-01-19T10:59:28.232Z
---

You can create **NAT rules on Mikrotik to automatically redirect all DNS queries** (**port 53 TCP and UDP**) to our datacenters.

Copy and paste the following commands into the *Mikrotik terminal*:

- /ip firewall nat
- add action=redirect chain=dstnat comment=internetprotection dst-port=53 protocol=udp to-ports=53
-  add action=redirect chain=dstnat comment=internetprotection dst-port=53 protocol=tcp to-ports=53
-  /ip firewall nat move \[/ip firewall nat find comment=internetprotection] 0
  \# Disable the use of Peer DNS.
-  /ip dhcp-client set use-peer-dns=no 0
-  /ip dns set servers=185.236.104.104,185.236.105.105
-  /ip dns set cache-max-ttl=5m

This will allow you to take advantage of *Mikrotik's cache*, improving network performance.



**Other ways to ask**:

- The operation of the general NAT rules for Mikrotik.
- The general NAT rules for Mikrotik. How to manage them.

