You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using dnscrypt-proxy (client) on Linux and (two) Windows hosts. On some Linux hosts DNS queries are handled by dnscrypt-proxy directly or handled by dnsmasq (dnsmasq in the middle).
On all hosts I'm working and have administration rights I add records into hosts file (to /etc/hosts on Linux and C:\Windows\System32\etc\hosts on Windows) but I noticed some "strange" behavior on Windows hosts: while ping seems to use records from hosts file the nslookup doesn't use them. On Linux both ping and host (or dig or drill) use records from /etc/hosts file.
Correct me if I'm wrong but as far as I understand dnscrypt-proxy doesn't handle hosts file on either system. On the other hand on Linux the /etc/hosts file is looked up before actual DNS query (that could be configured in nsswitch.conf). Also if there is dnsmasq (in the middle) it is read hosts and all seems to work fine. Whereas on Windows (it seems) ping utility resolves hosts using hosts and DNS queries but nslookup sends requests directly to DNS. Do I understand it right? And the only way for nslookup to give desire answer is to add records into cloaking-rules.txt file (then reload dnscrypt-proxy)?
I seemed to be confused by ping utility and nslookup-like (dig, drill, host) utilities. At first I thought that ping queries DNS to resolve domain names so it is purpose of DNS software to check names from hosts. Then I looked closely how ping and host, drill work on my Linux host where dnscrypt-proxy directly serves for DNS queries. It turned out that ping could resolve and ping names written in hosts while host and drill returned NXDOMAIN.
Correct me but now I think that ping (on Linux and Windows systems) always uses hosts and only after that queries DNS. As for nslookup and other utilities (host, dig, drill) they don't rely on hosts because simply send queries to DNS (software). So according to my findings, dnscrypt-proxy being used as DNS software don't take into account hosts file on either systems. One needs some other software (like dnsmasq) in the middle to follow hosts.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hello.
I'm using
dnscrypt-proxy(client) on Linux and (two) Windows hosts. On some Linux hosts DNS queries are handled bydnscrypt-proxydirectly or handled bydnsmasq(dnsmasqin the middle).On all hosts I'm working and have administration rights I add records into
hostsfile (to/etc/hostson Linux andC:\Windows\System32\etc\hostson Windows) but I noticed some "strange" behavior on Windows hosts: while ping seems to use records fromhostsfile thenslookupdoesn't use them. On Linux bothpingandhost(ordigordrill) use records from/etc/hostsfile.Correct me if I'm wrong but as far as I understand
dnscrypt-proxydoesn't handlehostsfile on either system. On the other hand on Linux the/etc/hostsfile is looked up before actual DNS query (that could be configured innsswitch.conf). Also if there isdnsmasq(in the middle) it is readhostsand all seems to work fine. Whereas on Windows (it seems)pingutility resolves hosts usinghostsand DNS queries butnslookupsends requests directly to DNS. Do I understand it right? And the only way fornslookupto give desire answer is to add records intocloaking-rules.txtfile (then reloaddnscrypt-proxy)?All reactions