Mailinglist Archive: opensuse (958 mails)

< Previous Next >
Re: [opensuse] Paths of DNS Queries
On 2019-05-01 9:42 a.m., Per Jessen wrote:
Carlos E. R. wrote:

nscd is not in the "official" loop, IMHO, so instead it puts itself in
the middle intercepting some library calls and giving an answer
without the library reaching its designed goal of reading the hosts
file or querying a DNS.

It is the resolver library that asks nscd. It's perfectly "official".
nscd listens on /var/run/nscd/socket.

That makes, sense, sort of.
It clears up HOW to communicate with nscd.
But where do we get the reference to use /var/run/nscd/socket?

I understand listening on localhost:53
Its a 'well known' address.
I can even grok listening on *:53 when I'm in a generous mood.
But something has to refer to /var/run/nscd/socket
As opposed to some other socket
In order to talk to nscd via that oscket they have to have found the address
/var/run/nscd/socket somewhere. So WHERE?

# find /var -type s -print

Or try that from "/" if you want to be overwhelmed.

I'm running dnsmasq not nscd but I find this interesting
# find / -type s -print | grep dns
/run/dovecot/dns-client
/var/run/dovecot/dns-client

Now dnsmasq listens on the well known port 53 (and yes that's configurable:
# grep -C 2 "53" /etc/dnsmasq.conf

# Listen on this specific port instead of the standard DNS port
# (53). Setting this to zero completely disables DNS function,
# leaving only DHCP and/or TFTP.
#port=5353
)

How do we get there?
Well the man pages for configuring dnsmasq say to set up /etc/resolve.conf to
have ONLY ONE entry:
nameserver 127.0.0.1

The man page says
In order to configure dnsmasq to act as cache for the host on which
it is running, put "name-server 127.0.0.1" in /etc/resolv.conf
to force local processes to send queries to dnsmasq.

And, as I mentioned earlier, dnsmasq can do its own caching.


Now nscd is a cache server and not a resolver.
I can see setting dnsmasq's own cache to zero and using nascd, but that seems a
bit complicated. And if that were to be done, it still doesn't clear up a few
HOW.

I must admit, in a single user system a lightweight dns resolver makes sense.
(MaraDNS might make even more sense since I'm not using DHCP)
(https://www.linuxjournal.com/content/localhost-dns-cache)
For email & web browsing, caching addresses makes sense - to a degree. but how
much does the application do the caching?

Realistically, my Thunderbird needs to cache
imap.mail.antonaylward.com
smtp.mail.antonaylward.com
That's the theory. Actually its all one "mail.antonaylward.com"
imap.gmail.com
smtp.gmail.com

Yes, Firefox is more demanding :-)

BUT there is little point in caching 'user credentials' from /etc/passwd
on a single user system.

--
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@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation