What's new

Adding Unblock-Us DNS using DNSMasq

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

xaviercharles

Regular Contributor
Hi everyone, im new to the forum, just bought the Asus RT-N66U and have flashed it with the Asuswrt-Merlin.

I was wondering how to use specific DNS rules for certain sites. I have added OpenDNS for my WAN DNS settings. But i use Unblock-US DNS for Netflix. From what i understand, i can use DNSMasq so that eveytime i connect to Netflix.com it can use the Unblock-US DNS instead of the OpenDNS rules.

I dont have any experience with SSH or Telnet and was wondering how i can do this.

I've searched online and found that others are putting this into DNSMasq.

server=/netflix.com/208.122.23.22
server=/netflix.com/208.122.23.23

I would appreciate if someone could help me out.

Thanks in advance.
 
Yes, just did this for tunlr.net dns. You need ad the options to dnsmasq.conf and restart dnsmasq. To do this automatically at every boot you can use the services-start script:

1. Enabele jffs in the router webui and restart.
2. ssh to the router and mkdir /jffs/scripts/
3. vi /jffs/scripts/services-start and paste:

#!/bin/sh
echo "server=/netflix.com/208.122.23.22" >> /tmp/etc/dnsmasq.conf
echo "server=/netflix.com/208.122.23.23" >> /tmp/etc/dnsmasq.conf
killall dnsmasq
dnsmasq -c 1500 --log-async -n

4. save and chmod +x /jffs/scripts/services-start
5. restart router

Best of luck.
 
Last edited:
Hey Jacobno,

thanks for the reply, i really appreciate it. I'll give it a go!

-----------------------------------------------------------------

I enabled JFFS partition and enabled SSH from the web ui.

I SSH'd into the router using terminal in mac and got the following on the screen

ASUSWRT RT-N66U_3.0.0.4 Tue Sep 25 02:53:14 UTC 2012
admin@RT-N66U:/tmp/home/root#

When try to do anything it just says "Permission denied"

I've tried using ls to see whats in the directory but to no avail. Am i doing something wrong here?
 
Last edited:
Glad to help.
BTW seems like RMerlin has implemented custom configs in source. But I'm not sure whether this is in the builds yet. Read this
 
Last edited:
Glad to help.
BTW seems like Rmerlin has implemented custom configs in source. But I'm not sure whether this is in the builds yet. Read this

It will be in the next release. I'm waiting for the next FW release from Asus so I can base my next release on it.
 
I enabled JFFS partition and enabled SSH from the web ui.

I SSH'd into the router using terminal in mac and got the following on the screen

ASUSWRT RT-N66U_3.0.0.4 Tue Sep 25 02:53:14 UTC 2012
admin@RT-N66U:/tmp/home/root#

When try to do anything it just says "Permission denied"

I've tried using ls to see whats in the directory but to no avail. Am i doing something wrong here?
 
Thought i'd flash back to the original firmware using the asus restore app then restore factory settings then flashed with merlins firmware version.

I enabled jffs and enabled ssh and rebooted the router. I ssh'd into the router first using terminal on the mac and then putty on windows using the username and password i use to log in to the web ui.

Still takes me to /tmp/home/root and and still get permission denied. Do i need to enable anything else on the router to get this to work?
 
Thought i'd flash back to the original firmware using the asus restore app then restore factory settings then flashed with merlins firmware version.

I enabled jffs and enabled ssh and rebooted the router. I ssh'd into the router first using terminal on the mac and then putty on windows using the username and password i use to log in to the web ui.

Still takes me to /tmp/home/root and and still get permission denied. Do i need to enable anything else on the router to get this to work?

What are you doing exactly that returns "permission denied"?

You will always get logged in /tmp/home/root because this is your home directory.
 
Hi Merlin,

I was trying to follow jacobno's instructions for adding custom DNS in DNSMasq so that only sites like hulu and netflix would use it.
 
Hi Merlin,

I was trying to follow jacobno's instructions for adding custom DNS in DNSMasq so that only sites like hulu and netflix would use it.

Which exact step was giving you the error message?
 
step 2: ssh to the router and mkdir /jffs/scripts/

The directory is automatically created by the firmware. If it doesn't exist then it means your jffs partition isn't properly mounted.

When you mount it for the first time, make sure to also select the option underneath it to format it. After selecting that, reboot the router a first time, and check if the scripts folder exist. If not, reboot a second time - sometimes it will format on the first reboot, but will only mount the newly formated partition on the second reboot.
 
Yes:

ls -l /jffs

Will show what's in the /jffs directory, for example.
 
Hey Merlin,

Just wanna say thanks for that. I did exactly what you said in post #12 and it worked!!

I have added the sites which i want to use the unblock-us DNS and it seems to be working. So i'm assuming now based on jacobno's instructions that these settings will remain even if the router is rebooted or switched off?
 
Hey Merlin,

Just wanna say thanks for that. I did exactly what you said in post #12 and it worked!!

I have added the sites which i want to use the unblock-us DNS and it seems to be working. So i'm assuming now based on jacobno's instructions that these settings will remain even if the router is rebooted or switched off?

Yes. Scripts in the jffs partition will survive reboots (but they might not survive flashing, so keep a copy of those scripts elsewhere), and gets reapplied every time.
 
Cool will do.

ps. I noticed Asus have put out a new firmware version (3.0.0.4.246) and seems like they've given a shout out to you for your contribution for fixing the buffer overrun problem.
 
Last edited:
Cool will do.

ps. I noticed Asus have put out a new firmware version (3.0.0.4.246) and seems like they've given a shout out to you for your contribution for fixing the buffer overrun problem.

Yep. :) Asus have been very supportive of my work and I'd say we have a very good relationship. That makes it a pleasure for me to work on this project. Out of it they get an extra pair of hands working with their code. The WPS button feature is another example of code that started in my custom firmware and which eventually found its way in the official firmware (in 246) because they felt it was a useful addition.

In the end, everybody wins, starting with their customers.
 
Im not sure if its a bug in DNSMasq or something but when i tried using Netflix US this morning i couldnt play the content. I logged into the US version i could see the content but when i tried to play it i got a message saying this content is not available in your location.

Also Pandora and Hulu worked fine, it was just Netflix.

I rebooted the router and then it worked fine.

Update:- I have just found out that it seems to be a Netflix issue according to unblock-us

http://support.unblock-us.com/custo...yer-error-you-cannot-watch-from-this-location
 
Last edited:
Seems like i've run into some issues again. I've just upgraded from 19b to 23b and i've tried to add the DNS for certain sites like i was advised to at the start of this post and it's worked so well up until now.

When i reboot after saving and chmod +x /jffs/scripts/services-start. The vi /jffs/scripts/services-start list is empty all the entries i made disappear.
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top