Community discussions

MikroTik App
 
pkats
just joined
Topic Author
Posts: 3
Joined: Wed Nov 10, 2010 7:54 pm

open recursive DNS port 53

Wed Nov 10, 2010 9:45 pm

I have customers routers that have "open recursive DNS port 53" and my upstream provider is telling me I need to get that blocked. Rather than chase down each customer I would like to block this at my core router. I have a firewall rule setup but it does not appear to be working. Any ideas what I'm doing wrong?

add action=drop chain=forward comment="" disabled=no dst-port=53 protocol=udp \
src-address=0.0.0.0/0 src-port=53
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 6949
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: open recursive DNS port 53

Thu Nov 11, 2010 3:02 pm

probably it is not working because UDP can use both TCP and UDP.

You can redirect all DNS requests to your router which is better solution
/ip firewall nat
add action=redirect chain=dstnat comment=dns dst-port=53 protocol=tcp to-ports=53
add action=redirect chain=dstnat dst-port=53 protocol=udp to-ports=53
 
blake
Member
Member
Posts: 426
Joined: Mon May 31, 2010 10:46 pm
Location: Arizona

Re: open recursive DNS port 53

Thu Nov 11, 2010 4:20 pm

He means "DNS can use both TCP and UDP."

And take off src-port=53. DNS clients / servers use random outgoing source ports, so you'll probably probably never match that rule.
 
FreddieMac502
just joined
Posts: 3
Joined: Thu Aug 01, 2013 11:22 pm

Re: open recursive DNS port 53

Fri Dec 27, 2013 5:20 pm

probably it is not working because UDP can use both TCP and UDP.

You can redirect all DNS requests to your router which is better solution
/ip firewall nat
add action=redirect chain=dstnat comment=dns dst-port=53 protocol=tcp to-ports=53
add action=redirect chain=dstnat dst-port=53 protocol=udp to-ports=53
I am having the same issue as pkats and I have implemented the script you suggested. But is there a way I can narrow it down to a single computer on my network? I have been going to each one I can get to doing deep antivirus scans but I was just curious if it was possible. Thank You
 
lashguti
Frequent Visitor
Frequent Visitor
Posts: 91
Joined: Sat Apr 21, 2012 7:42 am

Re: open recursive DNS port 53

Sat Jan 04, 2014 10:31 am

remove src-port=53, everything else is correct, and set the same rule in input chain on public interface if you use your Mikrotik router as dns proxy too.

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Moba, Semrush [Bot], wendland and 21 guests