need help?

hello, i hav a link from my provider, but i want to change with another provider, so the problem is that my client use 1st provider dns, and 2nd provider have othe dns, so how can i redirect just in my mikrotik and client dont need to change..

Regards Hablaraim

/ip firewall nat

chain=dstnat action=dst-nat to-addresses=1.2.3.4 (the ip of your new provider) to-ports=53 protocol=udp in-interface=local (or whatever your internal interface is called) dst-port=53

Or simply input the new provider’s DNS settings directly into Miktotik and then alter the above rule to redirect to the router.

so if my second provider dns are 192.68.22.222 then in thi nat rule i have to do like this:

chain=dstnat action=dst-nat to-addresses=192.168.22.222 to-ports=53 protocol=udp in-interface=local dst-port=53

so it’s not necessary to subscribe fist provider dns right?

if you can explain me cause i dont know what to do..


Best Regard hablilir

Depends if your susbscribers DNS service is free or not.

Otherwise just use OpenDNS.

208.67.222.222
208.67.220.220

helo everybody,

my clients use for example 192.168.1.1 dns and 192.168.1.2
so other provider have 182.168.1.1 and second 182.168.1.2, so how can i redirect dns in my mikrotik, cause i have much clients and i cant change every computer dns..

Thanks, Best regards…Muldahirr

With a local DNS cache, you’d use the following to set up the router as a resolving with the DNS servers of the ISP:

/ip dns
set allow-remote-requests=yes
set primary-dns=ip.of.primary.dns
set secondary-dns=ip.of.secondary.dns

And then transparently redirect all DNS requests to the router itself:

/ip firewall nat
add chain=dstnat protocol=tcp dst-port=53 in-interface=local action=redirect to-ports=53

Additionally, if you’re providing DHCP services, hand out your router IP for DNS.

You probably meant protocol UDP so note to Muldahir, change the dst-nat rule to reflect this.

Oops, yes, of course. Thanks for catching that.