Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Why tries 1 TW machine to resolve its hostname via DNS?

  1. #11
    Join Date
    Sep 2012
    Posts
    6,148

    Default Re: Why tries 1 TW machine to resolve its hostname via DNS?

    Quote Originally Posted by suse_rasputin View Post
    Code:
    cat /etc/resolv.conf 
    search XXXXXXXX.home.arpa
    So? Now I am rather confused what your question is. Your system behaves absolutely correct - because hostname is not present in /etc/hosts, is not resolved by mdns etc it is queried using DNS and DNS query adds domain name that is defined in search path.

    And this is what I see when I open FF:

    Code:
    No.    Time    Source    Destination    Protocol    Length    Info
    2    2020-12-01 15:04:40.063437    192.168.188.156    10.0.0.1    DNS    81    Standard query 0x9e5a A Dell6.XXXXXXX.home.arpa
    Well, Firefox wants to know IP address for its local hostname. I have no idea how to turn it off if it is possible at all. In any case, this question belongs to separate thread.

    So to answer your question in this thread title - one of applications wants to know IP address associated with (short) hostname of your system. It performs query via /etc/nsswitch.conf using configuration in hosts entry. None of configured resolver before DNS returns definitive answer so it calls DNS which does exactly what you told it to do.

    To fix it you can

    1. Add entry to /etc/hosts with fixed address. This is the exact reason why SUSE (actually, even SuSE yet) traditionally added entry with address 127.0.0.2 for hostname - to make sure hostname can always be resolved.
    2. Adjust /etc/resolv.conf when you connect to VPN and change search path to something your VPN DNS server understands.

  2. #12

    Default Re: Why tries 1 TW machine to resolve its hostname via DNS?

    Quote Originally Posted by arvidjaar View Post
    So? Now I am rather confused what your question is. Your system behaves absolutely correct - because hostname is not present in /etc/hosts, is not resolved by mdns etc it is queried using DNS and DNS query adds domain name that is defined in search path.


    Well, Firefox wants to know IP address for its local hostname. I have no idea how to turn it off if it is possible at all. In any case, this question belongs to separate thread.

    So to answer your question in this thread title - one of applications wants to know IP address associated with (short) hostname of your system. It performs query via /etc/nsswitch.conf using configuration in hosts entry. None of configured resolver before DNS returns definitive answer so it calls DNS which does exactly what you told it to do.

    To fix it you can

    1. Add entry to /etc/hosts with fixed address. This is the exact reason why SUSE (actually, even SuSE yet) traditionally added entry with address 127.0.0.2 for hostname - to make sure hostname can always be resolved.
    2. Adjust /etc/resolv.conf when you connect to VPN and change search path to something your VPN DNS server understands.
    Eeehm, now I'm confused, as I didn't provide /etc/hosts, so how do you know what's in there?

    And: I didn't change anything in /etc/hosts, so why should this be my fault at all?

    And: If "traditionally" 127.0.0.2 is provided, who changed the "tradition"?

    If I understand correctly, /etc/hosts needs a line:

    Code:
    127.0.0.2 XXXX.home.arpa
    On all Leaps and TWs I checked, the only entry was

    Code:
    127.0.0.1 localhost
    No host/domain at all...

    The question is: Why does Firefox request the local IP? To check for VPNs/TOR?
    Kind regards

    raspu

  3. #13

    Default Re: Why tries 1 TW machine to resolve its hostname via DNS?

    For the moment I added a domain override in unbound (remote, doing the DNS) to hand back requests for the local domain to the DNS handeling the local domain.

    The override is not functional, as the remote unbound can't reach the "local" unbound (problem with Wireguard, maybe Firewall rule, I couldn't make it work), but at least the request for the local domain is not handed to outside DNS servers, the client opening Firefox get's "ServFail" and after some re-tries Firefox gives up.

    No nice, but a solution of some kind.

    Remains the question: Why does Firefox resolve the hostname without/with local domain at all?
    Kind regards

    raspu

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •