- On FreshTomato, I was able to specify an entry in
addn-host
ofdnsmasq
to a file that poisons some DNS records, e.g.0.0.0.0 facebook.com
- After updating this file, I always run
service dnsmasq restart
and it works - I did the same on OpenWrt, but
ping facebook.com
on the router still gave me the real IP address - Any idea why?
- router uses upstream DNS, not the one on the router ?
Is there a way I can run a few simple commands to poison and unpoison the records?
thanks that worked, but I have quite a few FQDNs to block... and I forgot to mention earlier
- After blocking, I tested resolving on my Windows and it returned the real IP
- Thinking it might be the cache or something, I went to the router and try, it still returned the real IP
- That was how I concluded additional hosts did not work
- Actually I don't care if router can reach the FQDNs
- What matters is that my clients, e.g. Windows/Linux cannot reach the blocked FQDNs
Will additional hosts files work if i ignore the resolv file?
Yes, Ignore resolv file
made my Addtional hosts files
work
you can use the adblock package with a custom block list.
I tried that, but wasn't able to script it.
And on a separate note, resuming and suspending adblock
is super slow, /etc/init.d/adblock status
does not update until almost after 1 min
there are at least two or three adblock packages, but I can imagine the status doesn't update until all the default block lists have been DLed and crunched by the addon.
No, that's not what I meant.
Okay, so I have a switch on my HomeAssistant (HA) that when toggled will turn on/off ads by performing a SSH into the router. HA also connect separately to the router to retrieve the actual status of adblock.
The HA switch can't work coherently when there is a 1 min delay from telling it to suspend until it reports that it has suspended itself.
- After some further debugging,
Additional Hosts Files
expects a folder, not file - When given a path that has some host files,
addn-host
works reliably
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.