Block DNS Flood in Mikrotik


Dynamic Name Server has a task to help us in translating an IP address into a URL address which is easy for us to be remembered. To understand more further, please visit my post about How Does DNS Work? 

Mikrotik Router OS has a feature as a local DNS Server to save all visited link and local users do not need to ask translation to Public DNS like google.com (8.8.8.8) and it can saves bandwidth usage.

But, if we use shared ISP link, some of neighbor routers ask DNS query to our router and it makes our router workload increasing into 100% because it handles DNS query from local and also from internet.

To avoid external DNS query request, we have to block the request by adding this firewall rules.

Go to Terminal from your winbox or you could access your router from telnet/ssh.

/ip firewall filter
add chain=forward protocol=udp dst-port=53 out-interface=!ether1 action=drop
add chain=forward protocol=tcp dst-port=53 out-interface=!ether1 action=drop  

Note: ether1 is your local gateway/interface. You may add more rules if you have more than 1 local interfaces.


Comments