Re: [Dnsmasq-discuss] Why does dnsmasq append .home to a plain hostname?

2019-10-27 Thread Sean Warner
Hello,

 

I did some more testing and confirmed that the .home was being sent to the
dhcp client (my laptop) by the dhcp server on my router. The Windows OS then
appended that dns suffix when doing a dns lookup on any unqualified domain
names.

 

Actually I was able to confirm Windows order of name resolution:

1. The client checks to see if the name queried is its own.

2. The client then searches a local Hosts file, a list of IP address and
names stored on the local computer.

3. Domain Name System (DNS) servers are queried.

4. If the name is still not resolved, NetBIOS name resolution sequence
is used as a backup. This order can be changed by configuring the NetBIOS
node type of the client.

 

I need a webpage to work from Windows and from an Android phone so my
question now is to confirm what is the process of name resolution on Android
OS?

 

My dnsmasq.conf contains these two lines (as well as others!)

address=/mymovies/192.168.1.124

#address=/mymovies.home/192.168.1.124

 

So the mymovies.home is commented out.

 

Here is dnsmasq log file after I try to access a webpage from the Android
phone with the url http://mymovies

 

Oct 28 02:07:22 dnsmasq[16759]: query[A] mymovies.home from XX.XX.XXX.XXX

Oct 28 02:07:22 dnsmasq[16759]: forwarded mymovies.home to 192.168.1.254

Oct 28 02:07:24 dnsmasq[16759]: query[A] mymovies.home from XX.XX.XXX.XXX

Oct 28 02:07:24 dnsmasq[16759]: forwarded mymovies.home to 192.168.1.254

Oct 28 02:07:26 dnsmasq[16759]: reply mymovies.home is NXDOMAIN

Oct 28 02:07:26 dnsmasq[16759]: reply mymovies.home is NXDOMAIN

Oct 28 02:07:26 dnsmasq[16759]: query[A] mymovies from XX.XX.XXX.XXX

Oct 28 02:07:26 dnsmasq[16759]: config mymovies is 192.168.1.124

Oct 28 02:10:22 dnsmasq[16759]: query[A] mymovies from XX.XX.XXX.XXX

Oct 28 02:10:22 dnsmasq[16759]: config mymovies is 192.168.1.124

Oct 28 02:16:14 dnsmasq[18418]: query[A] mymovies from XX.XX.XXX.XXX

Oct 28 02:16:14 dnsmasq[18418]: config mymovies is 192.168.1.124

 

The X's are my routers public ip address redacted.

Can someone explain what is happening?

It looks like dnsmasq starts by trying to resolve mymovies.home then it
can't so it tries mymovies and succeeds?

So does this mean that Android OS will try to do name resolution on an
unqualified domain name? I know that Windows will not.

 

The last four lines in the log output are when I just repeated the same
webpage load from the Android phone two times. The first time I just
reloaded the page (at 02:10:22). The second time I actually restarted
dnsmasq and cleared the phones browser dns cache and recent history (at
02:16:14). However it looks like those last two name resolutions were
successful from an earlier cached response? Why didn't it try mymovies.home
on these last two occassions? Maybe I needed to do something like an
ipconfig /flushdns on the phone.. if only it was rooted, which it isn't.

 

Sorry but my understanding of dnsmasq is limited!

 

Thank you,

 

Flex

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Why does dnsmasq append .home to a plain hostname?

2019-10-22 Thread Hamish Moffatt

On 23/10/19 8:04 am, Sean Warner wrote:


Hello,

Thank you for answering Uwe. Your response gave me some good pointers.

I don’t think a “default domain” entry is coming from my Windows 
laptop. It’s Windows 7 Home Premium and that version knows nothing 
about domains. I googled that and also to see if Chrome maybe adds in 
a .home if a domain is “missing” but I don’t think it does either.




What does the Windows command "ipconfig /all" say? Look for "DNS Suffix" 
near the top and "connection-specific DNS suffix" on your network 
adapter. I think you will find "home" there.




Hamish

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Why does dnsmasq append .home to a plain hostname?

2019-10-22 Thread Kurt H Maier
On Tue, Oct 22, 2019 at 10:04:37PM +0100, Sean Warner wrote:
> 
> I don't think a "default domain" entry is coming from my Windows laptop.
> It's Windows 7 Home Premium and that version knows nothing about domains. I
> googled that and also to see if Chrome maybe adds in a .home if a domain is
> "missing" but I don't think it does either.

Windows uses the term 'domain' to mean something more than just DNS
domain.  All versions of Windows are aware of DNS domains;  it's the
other kind they upsell.

> I checked my router homepage and there is an option in there to pull up the
> homepage using the url http://mymodem.home instead of the usual
> http://192.168.1.254 It lets you change the "mymodem" part. So maybe the
> request for http://mymovies somehow gets the .home domain added to it when
> the request goes through the router and back to dnsmasq ?
> 
> Regarding having: "domain = home" in your dnsmasq config. I don't! Also my
> Windows laptop isn't configured to use dnsmasq for dhcp. My router gives out
> ip addresses and the laptop has a fixed ip as does the Pi.

Your router is almost certainly sending .home as the DNS domain in its
DHCP response.  Windows is appending it on bare-hostname lookups because
it was told by its DHCP server that it is part of the .home DNS domain.

khm

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Why does dnsmasq append .home to a plain hostname?

2019-10-22 Thread Sean Warner
Hello,

 

Thank you for answering Uwe. Your response gave me some good pointers.

 

I don't think a "default domain" entry is coming from my Windows laptop.
It's Windows 7 Home Premium and that version knows nothing about domains. I
googled that and also to see if Chrome maybe adds in a .home if a domain is
"missing" but I don't think it does either.

 

I checked my router homepage and there is an option in there to pull up the
homepage using the url http://mymodem.home instead of the usual
http://192.168.1.254 It lets you change the "mymodem" part. So maybe the
request for http://mymovies somehow gets the .home domain added to it when
the request goes through the router and back to dnsmasq ?

 

Regarding having: "domain = home" in your dnsmasq config. I don't! Also my
Windows laptop isn't configured to use dnsmasq for dhcp. My router gives out
ip addresses and the laptop has a fixed ip as does the Pi.

 

Thanks for your help. I'm just working through your advice to help me debug
where .home is coming from. I guess I could find more useful things to spend
time on but my problem is it annoys me when I don't understand things.
that's how stuff stops working and you have no idea why!

 

Flex

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Why does dnsmasq append .home to a plain hostname?

2019-10-22 Thread Uwe Schindler
Hi,

 

The reason for this is a “default domain” entry in the Windows 7 laptop 
configuration, so it is sent by the client in the case of a missing domain. It 
was not added by dnsmasq, but by the Windows client.

 

On the other hand, this still resolves, because you seem to also have a “domain 
= home” in your dnsmasq config, so the “mymovies” entry working also for the 
deafult domain on the dnsmasq side. As the windows device (using dnsmasq also 
for DHCP) gets the default domain by the above entry.

 

I am not sure what your problem is, to me it looks like it’s configured 
correctly. If you want “.ncp” your preferred domain, set “domain = ncp” and 
only keep the first entry.

 

Uwe

 

-

Uwe Schindler

Achterdiek 19, D-28357 Bremen

https://www.thetaphi.de

eMail: u...@thetaphi.de

 

From: Dnsmasq-discuss  On 
Behalf Of Sean Warner
Sent: Tuesday, October 22, 2019 2:25 AM
To: dnsmasq-discuss@lists.thekelleys.org.uk
Subject: [Dnsmasq-discuss] Why does dnsmasq append .home to a plain hostname?

 

Hello,

 

I have these two lines in my /etc/dnsmasq.conf

 

address=/mymovies/192.168.1.124

address=/mymovies.ncp/192.168.1.124

 

Dnsmasq is running on a Pi. Also on the same LAN is my Win 7 laptop. When I 
make this request from Chrome on the laptop… http://mymovies this is what I get 
in the dnsmasq log file:

Oct 21 23:38:12 dnsmasq[19823]: query[A] mymovies.home from XX.XX.XXX.XXX

Oct 21 23:38:12 dnsmasq[19823]: config mymovies.home is 192.168.1.124

 

However when I make this request from Chrome http://mymovies.ncp this is what I 
get in the dnsmasq log file:

Oct 21 23:41:54 dnsmasq[19823]: query[A] mymovies.ncp from XX.XX.XXX.XXX

Oct 21 23:41:54 dnsmasq[19823]: config mymovies.ncp is 192.168.1.124

 

Apologies if this is a really basic question, I am a beginner with dnsmasq. Why 
is .home appended to a hostname when it is just a plain simple word without any 
domain or tld?

 

Thank you,

 

Flex

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] Why does dnsmasq append .home to a plain hostname?

2019-10-21 Thread Sean Warner
Hello,

 

I have these two lines in my /etc/dnsmasq.conf

 

address=/mymovies/192.168.1.124

address=/mymovies.ncp/192.168.1.124

 

Dnsmasq is running on a Pi. Also on the same LAN is my Win 7 laptop. When I
make this request from Chrome on the laptop. http://mymovies this is what I
get in the dnsmasq log file:

Oct 21 23:38:12 dnsmasq[19823]: query[A] mymovies.home from XX.XX.XXX.XXX

Oct 21 23:38:12 dnsmasq[19823]: config mymovies.home is 192.168.1.124

 

However when I make this request from Chrome http://mymovies.ncp this is
what I get in the dnsmasq log file:

Oct 21 23:41:54 dnsmasq[19823]: query[A] mymovies.ncp from XX.XX.XXX.XXX

Oct 21 23:41:54 dnsmasq[19823]: config mymovies.ncp is 192.168.1.124

 

Apologies if this is a really basic question, I am a beginner with dnsmasq.
Why is .home appended to a hostname when it is just a plain simple word
without any domain or tld?

 

Thank you,

 

Flex

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss