On Sat, 15 Aug 2015 15:26, Anton Aylward wrote:
I'm using a axillary hosts-like file with dnsmasq to exclude advert and pwn sites. We've touched on this as an alternative for adblock with firefox.
I have in /etc/dnsmasq.conf
---------------------- # If you don't want dnsmasq to read /etc/hosts, uncomment the # following line. #no-hosts # or if you want it to read another file, as well as /etc/hosts, use # this. #addn-hosts=/etc/banner_add_hosts addn-hosts=/etc/block.hosts.txt ----------------------
And
# ls -l /etc/hosts /etc/block.hosts.txt -rw-rw-rw- 1 root root 762944 Aug 14 10:50 /etc/block.hosts.txt -rw-r--r-- 1 root root 764312 Aug 14 11:08 /etc/hosts
But when I restart dnsmasq I get the following error
$ sudo systemctl status dnsmasq.service ... Aug 14 11:09:01 Mainbox dnsmasq[14934]: failed to load names from /etc/block.hosts.txt: Permission denied
I've also tried with the command line option. That produces the same error.
But if I paste the block file into the end of /etc/hosts there is no problem.
I can't see why dnsmasq is seeing an access control problem? What am I missing?
https://hugoheden.wordpress.com/2009/02/24/dnsmasq-and-etchosts/
http://www.linksysinfo.org/index.php?threads/blocking-ads-using-dnsmasq-with...
First hint: Permission problem. Try: "chmod go-w /etc/block.hosts.txt" and "systemctl restart dnsmasq.service" The shown file (/etc/block.hosts.txt) is too open in its file permissions and thus dnsmasq blocks opening that file for security reasons. - Yamaban. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org