Community discussions

MUM Europe 2020
 
joshelhoff
just joined
Topic Author
Posts: 9
Joined: Tue May 29, 2007 5:30 pm

DNS Re-Direct

Thu Aug 21, 2008 10:24 pm

Here's the situation:
We're using our upstream provider's DNS servers. They're shutting them down. All of our clients have them statically defined on their pc.

Can I set up a rule on the mikrotik to re-direct their DNS requests to the new servers while I get them all switched over to DHCP?
 
changeip
Forum Guru
Forum Guru
Posts: 3804
Joined: Fri May 28, 2004 5:22 pm

Re: DNS Re-Direct

Thu Aug 21, 2008 11:50 pm

sure, use dst-nat.
Colo and Wholesale Bandwidth Available! Sales at SanDiegoBroadband dot com
 
Pepo
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Thu May 29, 2008 1:34 am

Re: DNS Re-Direct

Fri Aug 22, 2008 12:14 am

Please my friends, put to us a quick example for that you say
 
changeip
Forum Guru
Forum Guru
Posts: 3804
Joined: Fri May 28, 2004 5:22 pm

Re: DNS Re-Direct

Fri Aug 22, 2008 12:39 am

/ip firewall nat add action=dst-nat out-interface=0-coxRes dst-address=1.2.3.4 dst-port=53 protocol=udp to-addresses=5.6.7.8
Colo and Wholesale Bandwidth Available! Sales at SanDiegoBroadband dot com
 
joshelhoff
just joined
Topic Author
Posts: 9
Joined: Tue May 29, 2007 5:30 pm

Re: DNS Re-Direct

Fri Aug 22, 2008 2:18 pm

So this is what I tried and no dice. When I do a nslookup on my pc on the inside interface it still queries the 1.2.3.4 dns server. Instead of the new 5.6.7.8 dns. I'm running V3.11 on an RB600.

/ip firewall nat add action=dst-nat out-interface=AliantDemarc dst-address=1.2.3.4 dst-port=53 pro
tocol=udp to-addresses=5.6.7.8

Any thoughts?

I've got about 500 people to get in touch with and get them to switch to DHCP just trying to buy some more time do it before the old DNS servers are taken down.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5960
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: DNS Re-Direct

Fri Aug 22, 2008 2:21 pm

redirect all dns requests to your router. And specify correct dns servers in /ip dns primary-dns and seconary-dns
 
joshelhoff
just joined
Topic Author
Posts: 9
Joined: Tue May 29, 2007 5:30 pm

Re: DNS Re-Direct

Fri Aug 22, 2008 3:23 pm

I have the DNS servers listed in the Tik, could you do me a favor and provide an example of how to redirect the DNS traffic to the TIK?


Thks!
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5960
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: DNS Re-Direct

Fri Aug 22, 2008 3:27 pm

/ip firewall nat
add action=redirect chain=dstnat comment="" disabled=no dst-port=53 protocol=tcp to-ports=53
add action=redirect chain=dstnat comment="" disabled=no dst-port=53 protocol=udp to-ports=53
 
frogman79
just joined
Posts: 1
Joined: Fri Aug 22, 2008 3:59 pm

Re: DNS Re-Direct

Fri Aug 22, 2008 4:21 pm

Little trick we used when the listed DNS servers that our techs where programing into installs became unavailable. At least it works for us. :lol:

/ip firewall mangle
add action=mark-packet chain=prerouting comment="DNS REDIRECT MANG RULE" \
disabled=no dst-port=53 new-packet-mark=dns_redirect passthrough=yes \
protocol=udp

/ip firewall nat
add action=dst-nat chain=dstnat comment="DNS REDIRECT" disabled=no \
packet-mark=dns_redirect protocol=udp to-addresses=XXX.XXX.XXX.XXX \
to-ports=53

Doesn't matter where the computer wants to go, the MT grabs the DNS connection, marks that packet and then dst-nat's it to the DNS server of your choice.
 
joshelhoff
just joined
Topic Author
Posts: 9
Joined: Tue May 29, 2007 5:30 pm

Re: DNS Re-Direct

Fri Aug 22, 2008 4:30 pm

Cheers Guys! Really appreciate all the input!

Who is online

Users browsing this forum: No registered users and 104 guests