Setting up MikroTik/RouterOS with Conditional DNS Forwarding (UnoTelly/UnblockUS)

I have a MikroTik RouterOS device that has some custom DNS settings and therefore I cannot change the DNS servers it provides to clients, which is a requirement to use UnoTelly or Unblockus. Instead I found the following article very helpful, it allows you to configure Conditional DNS forwarding for specific domains.

https://www.dalemacartney.com/2012/12/29/dns-conditional-forwarders-with-mikrotik-routeros/

This works well because I use MediaHint to swap back and forth for NetFlix US and Canada, but use only the US Amazon Prime.

/ip firewall layer7-protocol add name=domain.com regexp=domain.com
/ip firewall mangle add chain=prerouting dst-address=<routeripaddress> layer7-protocol=domain.com action=mark-connection new-connection-mark=domain.com-forward protocol=tcp dst-port=53
/ip firewall mangle add chain=prerouting dst-address=<routeripaddress> layer7-protocol=domain.com action=mark-connection new-connection-mark=domain.com-forward protocol=udp dst-port=53
/ip firewall nat add action=dst-nat chain=dstnat connection-mark=domain.com-forward to-addresses=<UnoTellyDNSServerIPAddress>
/ip firewall nat add action=masquerade chain=srcnat connection-mark=domain.com-forward

 


Did you like this article?


0 Shares:
You May Also Like

Sun Microsystems Acquires MySQL

I woke up to a very big announcement today. I was browsing digg and found that MySQL was acquired by Sun Microsystems. You can read more about the acquisition on the MySQL blog of Kaj Arno about the acquisition of MySQL by Sun Microsystems. My take, with Sun releasing Solaris into the Open Source realm, this is just another piece of software that they can put under their belt and package with Solaris. I have included some blurbs from Kaj Arno's blog below.
Read More

Creators Of Mobile Chat For the iPhone Twenty08 Hires AplloIM Developer

If you bought the iPhone when it first came out, you had two choices for Instant Messaging. Twenty08's MobileChat and Alex Schaefer's ApolloIM. Twenty08 has now hired Alex Schaefer to work exclusively on MobileChat
twenty08 would like to formally welcome aboard…Alex Schaefer. Many of you may know him as the founder of the world’s first Native iPhone IM Application, ApolloIM. ApolloIM was an amazing application and during it’s run, MobileChat and Apollo stood head to head and constantly battled to create the better app. (Friendly war of course!) The best part about it was that no one won! Only our respective users benefited from the friendly competition, and you can’t ask for anything better than that as far as I’m concerned. Now with Alex working on our side, we believe that MobileChat will be able to rise up and regain its glory as the number one iPhone application that we all know it can be. He is a very talented developer (plus a great guy) who has already brought some great ideas to the table and we’re all very excited to see our new-found relationship grow.
Read the full article on Twenty08's site. MobileChat's website
Read More