What's new

DNSMASQ address blocking syntax?

  • 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!

Wuffles

Occasional Visitor
Hello reader.

Trying to revive the (now dead) Internet radio functions of a couple of older Yamaha amps by hosting my own "vtuner" (yCast) server on an old Raspberry Pi I currently have knocking about.

To trick the Yamaha amps that are hard-coded to some subdomain or other of vtuner.com, I am attempting to add a record to the hosts.add file on my Asus RT-AC86U pointing them to the internal IP of the Rpi. Which much reading suggests to be the way forward, as there's no obvious GUI way of adding a record.

I've enabled JFFS on the router, rebooted it, and added a file named hosts.add in /jffs/configs/ containing the following:

Code:
192.168.0.151 radioyamaha.vtuner.com

I expect there's something obvious missing from this process, but having read the documentation, I am blind to it.

A traceroute to radioyamaha.vtuner.com via the ASUS as my default DNS takes me all the way to the actual radioyamaha.vtuner.com address, and not to the placeholder 192.168.0.151 address.

What's that all about?

Cheers all.
 
To check whether your custom config has worked SSH into the router and type the following:
Code:
cd /etc
cat hosts
Do you see your entry added to the end of that file?

P.S. You did reboot after creating the hosts.add file?
 
You would have to restart dnsmasq for the hosts.add to take effect.
Code:
service restart_dnsmasq
Or reboot the router.
 
To check whether your custom config has worked SSH into the router and type the following:
Code:
cd /etc
cat hosts
Do you see your entry added to the end of that file?

P.S. You did reboot after creating the hosts.add file?
I did not. I didn't see any mention of that anywhere - I'm in a high stakes production environment* so it's difficult to reboot most of the time. I can however restart the service.

Also, in the hosts file, I've got an interesting thing happened (I've included the bottom two lines):

Code:
192.168.0.1 www.asusrouter.com
radioyamaha.vtuner.com 192.168.0.151

*my Wife is working from home, she'll murder me if I start rebooting stuff.
 
Also, in the hosts file, I've got an interesting thing happened (I've included the bottom two lines):

Code:
192.168.0.1 www.asusrouter.com
radioyamaha.vtuner.com 192.168.0.151

*my Wife is working from home, she'll murder me if I start rebooting stuff.
Double check the contents of your hosts.add file. I suspect you've got it the wrong way around because you copied it from the sentence in post #1 of the other thread.
 
Double check the contents of your hosts.add file. I suspect you've got it the wrong way around because you copied it from the sentence in the other thread.
No I'd copied it from the hosts.add file.

192.168.0.151 radioyamaha.vtuner.com
 
I promise you it's correct, that's where I was copying it from, however I bet I had it wrong on one of my late night experiments. Can I just edit it out of the etc/hosts file and let it repopulate from the hosts.add file?

(And by correct, I mean correct since last night).
 
I promise you it's correct, that's where I was copying it from, however I bet I had it wrong on one of my late night experiments.
I wanted to see what else might be in that file or whether there was some corruption which might be causing the problem.

Can I just edit it out of the etc/hosts file and let it repopulate from the hosts.add file?
The etc/hosts file will be recreated, including the contents of hosts.add when you reboot or run service restart_dnsmasq.
 
I wanted to see what else might be in that file or whether there was some corruption which might be causing the problem.


The etc/hosts file will be recreated, including the contents of hosts.add when you reboot or run service restart_dnsmasq.
Righto, here you go.

wuffles@RT-AC86U-6C78:/jffs/configs# cat /jffs/configs/hosts.add
192.168.0.151 radioyamaha.vtuner.com

I'll restart service now and see what it amends the other file to.
 
Superb. New file content:

Code:
wuffles@RT-AC86U-6C78:/jffs/configs# more /e(space)tc/hosts

127.0.0.1 localhost.localdomain localhost
192.168.0.1 RT-AC86U-6C78. RT-AC86U-6C78
192.168.0.1 RT-AC86U-6C78.local
192.168.0.1 router.asus.com
192.168.0.1 www.asusnetwork.net
192.168.0.1 www.asusrouter.com
192.168.0.151 radioyamaha.vtuner.com

And what was expecting from a traceroute:

Code:
traceroute radioyamaha.vtuner.com

traceroute to radioyamaha.vtuner.com (192.168.0.151), 64 hops max, 52 byte packets
1  radioyamaha.vtuner.com (192.168.0.151)  1.586 ms  0.971 ms  0.970 ms

Thanks so much guys.

Wife was also unaffected by this, in case you were worried for my safety.
 
I thought I may as well resurrect this rather than start a new one.

Why would I not be able to get this working through dnsmasq.conf.add rather than hosts? I bet it's a simple thing I'm doing wrong.

Example that doesn't seem to work, even though it's getting appended to the dnsmasq.conf file in etc -

Code:
address=/samsungads.com/0.0.0.0
address=/samsung.com/0.0.0.0
address=/vtuner.com/192.168.0.156

Actually, the samsungads.com pointed within the hosts.add file doesn't seem to work either, which is why I was trying it in dnsmasq.conf.add instead as that's where everything on google suggests I do it.
 

Latest threads

Sign Up For SNBForums Daily Digest

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