[opensuse] Problems with DNSMasq
I'm using DNSmask lcoally. Mostly it is fine. I have a line in /etc/dnsmasq.conf that read # or if you want it to read another file, as well as /etc/hosts, use # this. addn-hosts=/etc/dnsmasq.d/block.hosts.txt The idea is to have lines like 127.0.0.1 addserver.mtv.com in there so that I don't see adverts. In that, it works. But to get some sites, such as HuffPost.ca, to work, I need to allow and advertising site, guce.advertising.com. So first I commented it out of the file, started the line is a hash - "#" just like works /etc/hosts, and restarted DNSMasq. Well it still go pinged to 127.0.0.1. I presumes it was a TTL issue and waited. No it still came back. That was last night. Its still like that this morning. Now I take the like out of the file altogether. Still the problem. In fact all the lines that begin # 127.0.0.1 are like that. The hash to comment them out isn't working. Now I remove that line altogether from /etc/dnsmasq.conf and restart dnsmasq. But still a ping or nslookiup to those addresses comes back as 127.0.0.1 TTL? Cache? -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday, 2019-09-23 at 09:19 -0400, Anton Aylward wrote:
TTL? Cache?
Try: systemctl restart nscd - -- Cheers, Carlos E. R. (from openSUSE 15.0 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCXYjHIBwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVaisAn1RUOWXHuKByHJ7gTK6v jH1qnmY/AJ9dfCfR3vq1F4z87MylLQTz575Adg== =0neF -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 23/09/2019 09:22, Carlos E. R. wrote:
systemctl restart nscd
# systemctl restart nscd Failed to restart nscd.service: Unit nscd.service failed to load: No such file or directory. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 23/09/2019 15.40, Anton Aylward wrote:
On 23/09/2019 09:22, Carlos E. R. wrote:
systemctl restart nscd
# systemctl restart nscd Failed to restart nscd.service: Unit nscd.service failed to load: No such file or directory.
Wow! That is very strange, supposedly that is always installed by default. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On 23/09/2019 09:19, Anton Aylward wrote:
I'm using DNSmask lcoally. Mostly it is fine.
I have a line in /etc/dnsmasq.conf that read
# or if you want it to read another file, as well as /etc/hosts, use # this. addn-hosts=/etc/dnsmasq.d/block.hosts.txt
The idea is to have lines like 127.0.0.1 addserver.mtv.com
in there so that I don't see adverts. In that, it works.
But to get some sites, such as HuffPost.ca, to work, I need to allow and advertising site, guce.advertising.com.
So first I commented it out of the file, started the line is a hash - "#" just like works /etc/hosts, and restarted DNSMasq. Well it still go pinged to 127.0.0.1. I presumes it was a TTL issue and waited. No it still came back. That was last night. Its still like that this morning. Now I take the like out of the file altogether. Still the problem. In fact all the lines that begin # 127.0.0.1 are like that. The hash to comment them out isn't working.
Now I remove that line altogether from /etc/dnsmasq.conf and restart dnsmasq. But still a ping or nslookiup to those addresses comes back as 127.0.0.1
TTL? Cache?
Well I've disabled just about everything in DNSmasq.conf except getting responses from 8.8.8.8 and 8.8.4.4 and "success!", if you call crippling everything as 'success'. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hello, On Mon, 23 Sep 2019, Anton Aylward wrote:
I'm using DNSmask lcoally. Mostly it is fine.
I have a line in /etc/dnsmasq.conf that read
# or if you want it to read another file, as well as /etc/hosts, use # this. addn-hosts=/etc/dnsmasq.d/block.hosts.txt
The idea is to have lines like 127.0.0.1 addserver.mtv.com
in there so that I don't see adverts.
Much better is to use local adress definitions like this: ==== /etc/dnsmasq.conf ==== ### use one extra config file conf-file=/etc/dnsmasq.d/blockhosts.conf # ### or use all *.conf files in there # conf-dir=/etc/dnsmasq.d,*.conf # ### or use all files in there # conf-dir=/etc/dnsmasq.d ==== ==== /etc/dnsmasq.d/blockhosts.conf ==== address=/addserver.mtv.com/ address=/doubleclick.com/ ==== That gives you NXDOMAIN for all (sub-)domains under addserver.mtv.com and doubleclick.com... You can also redirect to an IP e.g. localhost as such: ==== address=/addserver.mtv.com/127.0.0.1 ==== HTH, -dnh -- panic("Yeee, unsupported cache architecture."); linux-2.6.6/arch/mips/mm/cache.c -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Anton Aylward
-
Carlos E. R.
-
David Haller