for raw table;
/ip firewall raw
add action=drop chain=prerouting dst-port=53 in-interface=WAN protocol=tcp
add action=drop chain=prerouting dst-port=53 in-interface=WAN protocol=udp
for filter;
/ip firewall filter
add action=reject chain=input comment=DNS dst-port=53 protocol=udp reject-with=icmp-port-unreachable
add action=reject chain=input comment=DNS dst-port=53 protocol=tcp reject-with=icmp-port-unreachable
Or
/ip firewall filter
add action=drop chain=input comment=DNS dst-port=53 protocol=udp
add action=drop chain=input comment=DNS dst-port=53 protocol=tcp
add action=drop chain=foward comment=DNS dst-port=53 protocol=udp
add action=drop chain=foward comment=DNS dst-port=53 protocol=tcp