-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/09/2016 07:59 AM, Ptits de Barbe wrote: > Sorry, didn't get correct understanding of your setup from first mail, though > now it seems to have good enough description. > Anyway, I believe it is local apps (or rather a name resolving library ?) > that are issuing original query for dupaa.com.mhouse.lh, not the caching > dnsmasq on your PC. I've seen similar behavior of nslookup on Windows. > Turning on query log on local dnsmasq should prove this. > As for me, this is not a problem at all, as the query is sent to you router > and it definitely knows how to respond. However, if you'd specify mhouse.lh > as 'domain' (not 'search') option in resolv.conf, I believe the resolving lib > will append the suffix to unqualified hostnames only. I've enabled the logs, but there's no visible difference between setting "search" or "domain" to "mhouse.lh" in the /etc/resolv.conf file. In both cases, it looks like this:
Jan 09 14:33:30 morfikownia dnsmasq[35363]: query[A] dupaa.com from 127.0.0.1 Jan 09 14:33:30 morfikownia dnsmasq[35363]: forwarded dupaa.com to 127.0.2.1 Jan 09 14:33:35 morfikownia dnsmasq[35363]: query[A] dupaa.com from 127.0.0.1 Jan 09 14:33:35 morfikownia dnsmasq[35363]: forwarded dupaa.com to 127.0.2.1 Jan 09 14:33:36 morfikownia dnsmasq[35363]: query[A] dupaa.com.mhouse.lh from 127.0.0.1 Jan 09 14:33:36 morfikownia dnsmasq[35363]: forwarded dupaa.com.mhouse.lh to 192.168.1.1 I've also found out why there's two queries sent to 127.0.0.1 . In the "man resolv.conf" you can read the following: attempts:n Sets the number of times the resolver will send a query to its name servers before giving up and returning an error to the calling application. The default is RES_DFLRETRY (currently 2, see <resolv.h>). I've set this to 5 (options attempts:5) in order to check whether it works or not, and I got 5 local requests before sending it to the router. So that's why it sends 2, and not only one. > > Mikhail Morfikov <mmorfi...@gmail.com> писал(а) в своём письме Fri, 08 Jan > 2016 15:29:22 +0300: > >> On 01/08/2016 07:46 AM, Ptits de Barbe wrote: >> Actually there are two instances of dnsmasq. The first one is installed on >> my local machine and it acts just as a cache (IP 127.0.0.1). The second >> one is installed on my network router (192.168.1.1). -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJWkRKOAAoJEM0EaBB3G2UgvY4QAJ89bgl5LF7U3nTQL1UQE5n/ g6cMfEqvY7WiBX56HE7EUgjycF2Lazf1BGQh9TvDJKgxzqb6UVE/MvvI3N/DZUiq QFGuM/gkw6DWntwsLn5oXNgLMPb1n75AZcqVDwFJvRIuZed98xC45yO7JgNf5Nj6 I01yL248cV5aSIZoZdmHHnJzfDiJd2XSG49mptlRvLpuX53UCAyeX6AsCM4pK3dQ OqmoJCgC2KZL8MoFo25UVgVoy178Zrx21WuzXlAZ0kOtpUbwT4FJn8qQQnKVQ8ws MtC3Hx2nDT3w/g2njzH/L6TIjmEZI5D/JVoGoIVBglLVT3948dpbLy8dKvqYBGpe tepkkdE8riuLN7wazzbrhrHuODKGyMFGpY+8WxwY4QaNUnHCS5NnO5sc5XUpiKo1 1dZvUaakNW19TCcTBg3M1VordeBwlE2ec1HHp/RNP1jfmyMtaM/RboAUzIq64dsG 9CrYBMoSTtbxhQjWoaCApyBmFASuoZkCgmWbVYrx5fdBY6Xj5/t0F9BA/qqw35oY LBQIrgIUncZnMfZ+w6kGsYzs96gWOMun6kFsSWTFe37rY7202/Cylx/jRGPc8hol 8IdoBCQfemn1tWmyt+DcLXQOF/ZMhzbrfdrkYcO6frCCy7ZjCjZCkcPgiktRR6qc JFbP/VfBq7PEjrd887Rh =ZiHS -----END PGP SIGNATURE----- _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss