ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Fedora name resolution

    Scheduled Pinned Locked Moved IT Discussion
    28 Posts 5 Posters 1.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • siringoS
      siringo @scottalanmiller
      last edited by

      @scottalanmiller said in Fedora name resolution:

      Same command as on Windows...

      nslookup sitename
      

      That'll tell us what it is "doing."

      If I go "nslookup hostname" I get told that there is no entry for 'hostname' in DNS which looks correct.

      scottalanmillerS 1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller
        last edited by

        Your DNS settings are kept in a file called /etc/resolv.conf, you'll want it to look something like this...

        nameserver 1.1.1.1
        nameserver 1.0.0.1
        
        ObsolesceO 1 Reply Last reply Reply Quote 1
        • ObsolesceO
          Obsolesce @black3dynamite
          last edited by

          @black3dynamite said in Fedora name resolution:

          @obsolesce said in Fedora name resolution:

          If it's a .local domain, edit the avahi-daemon.conf file:

          Un-comment the following line, and add a . (dot) infront of local:

          domain-name=.local

          Then restart network or reboot.

          Why not edit /etc/nsswitch.conf instead?
          https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625

          Change...
          hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname

          To...
          hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname

          I wasn't aware of that option.

          Can you tell me why one solution is better than the other or why one is worse than the other?

          stacksofplatesS black3dynamiteB 2 Replies Last reply Reply Quote 0
          • ObsolesceO
            Obsolesce @scottalanmiller
            last edited by

            @scottalanmiller said in Fedora name resolution:

            Your DNS settings are kept in a file called /etc/resolv.conf, you'll want it to look something like this...

            nameserver 1.1.1.1
            nameserver 1.0.0.1
            

            If he has to do that something is wrong. Otherwise, won't he need to change that every time he connects to a different LAN?

            I ran in to that issue before. A reboot solved it, rather than having to manually enter nameservers.

            1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller @siringo
              last edited by

              @siringo said in Fedora name resolution:

              @scottalanmiller said in Fedora name resolution:

              Same command as on Windows...

              nslookup sitename
              

              That'll tell us what it is "doing."

              If I go "nslookup hostname" I get told that there is no entry for 'hostname' in DNS which looks correct.

              You are doing hostname, not FQDN?

              1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller
                last edited by

                If searching for a hostname, do you have a "search" option in /etc/resolv.conf ?

                1 Reply Last reply Reply Quote 0
                • stacksofplatesS
                  stacksofplates @Obsolesce
                  last edited by

                  @obsolesce said in Fedora name resolution:

                  @black3dynamite said in Fedora name resolution:

                  @obsolesce said in Fedora name resolution:

                  If it's a .local domain, edit the avahi-daemon.conf file:

                  Un-comment the following line, and add a . (dot) infront of local:

                  domain-name=.local

                  Then restart network or reboot.

                  Why not edit /etc/nsswitch.conf instead?
                  https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625

                  Change...
                  hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname

                  To...
                  hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname

                  I wasn't aware of that option.

                  Can you tell me why one solution is better than the other or why one is worse than the other?

                  nsswitch defines the default order to look for information. Thats where you define user, group, sudo, DNS, etc lookups.

                  1 Reply Last reply Reply Quote 0
                  • stacksofplatesS
                    stacksofplates
                    last edited by

                    A couple things. As @scottalanmiller pointed out, make sure to check your /etc/resolve.conf. That gives you the DNS servers and search domain to query. If all of that lines up, then I would check your /etc/nsswitch.conf file and make sure dns is after files.

                    black3dynamiteB 1 Reply Last reply Reply Quote 2
                    • black3dynamiteB
                      black3dynamite @Obsolesce
                      last edited by black3dynamite

                      @obsolesce said in Fedora name resolution:

                      @black3dynamite said in Fedora name resolution:

                      @obsolesce said in Fedora name resolution:

                      If it's a .local domain, edit the avahi-daemon.conf file:

                      Un-comment the following line, and add a . (dot) infront of local:

                      domain-name=.local

                      Then restart network or reboot.

                      Why not edit /etc/nsswitch.conf instead?
                      https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625

                      Change...
                      hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname

                      To...
                      hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname

                      I wasn't aware of that option.

                      Can you tell me why one solution is better than the other or why one is worse than the other?

                      Has long as dns is after files in the hosts: section in nsswitch.conf file, utilities like nslookup should work correctly.

                      ObsolesceO 1 Reply Last reply Reply Quote 1
                      • black3dynamiteB
                        black3dynamite @stacksofplates
                        last edited by

                        @stacksofplates said in Fedora name resolution:

                        A couple things. As @scottalanmiller pointed out, make sure to check your /etc/resolve.conf. That gives you the DNS servers and search domain to query. If all of that lines up, then I would check your /etc/nsswitch.conf file and make sure dns is after files.

                        I notice with a clean install of Fedora 28, the nsswitch.conf is auto created and manage by authselect instead authconfig.
                        https://fedoraproject.org/wiki/Changes/AuthselectAsDefault

                        The settings in the nsswitch.conf file is different too.

                        # Generated by authselect on Fri May 11 18:52:54 2018
                        # Do not modify this file manually.
                        
                        passwd:      sss files systemd
                        group:       sss files systemd
                        netgroup:   sss files
                        automount:  sss files
                        services:   sss files
                        sudoers:    files
                        
                        shadow:     files
                        ethers:     files
                        netmasks:   files
                        networks:   files
                        protocols:  files
                        rpc:        files
                        hosts:      files dns myhostname
                        
                        aliases:    files nisplus
                        bootparams: nisplus [NOTFOUND=return] files
                        publickey:  nisplus
                        ~                   
                        

                        By default the order for hosts is now files, dns, myhostname instead of hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname from the previous Fedora releases.

                        1 Reply Last reply Reply Quote 0
                        • ObsolesceO
                          Obsolesce @black3dynamite
                          last edited by

                          @black3dynamite said in Fedora name resolution:

                          @obsolesce said in Fedora name resolution:

                          @black3dynamite said in Fedora name resolution:

                          @obsolesce said in Fedora name resolution:

                          If it's a .local domain, edit the avahi-daemon.conf file:

                          Un-comment the following line, and add a . (dot) infront of local:

                          domain-name=.local

                          Then restart network or reboot.

                          Why not edit /etc/nsswitch.conf instead?
                          https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625

                          Change...
                          hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname

                          To...
                          hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname

                          I wasn't aware of that option.

                          Can you tell me why one solution is better than the other or why one is worse than the other?

                          Has long as dns is after files in the hosts: section in nsswitch.conf file, utilities like nslookup should work correctly.

                          Un-commenting the .local line in the other file seems to do the job just fine. Still not seeing any advantages to doing it the other way, or disadvantages to keep doing it how I am.

                          black3dynamiteB 1 Reply Last reply Reply Quote 0
                          • black3dynamiteB
                            black3dynamite @Obsolesce
                            last edited by black3dynamite

                            @obsolesce said in Fedora name resolution:

                            @black3dynamite said in Fedora name resolution:

                            @obsolesce said in Fedora name resolution:

                            @black3dynamite said in Fedora name resolution:

                            @obsolesce said in Fedora name resolution:

                            If it's a .local domain, edit the avahi-daemon.conf file:

                            Un-comment the following line, and add a . (dot) infront of local:

                            domain-name=.local

                            Then restart network or reboot.

                            Why not edit /etc/nsswitch.conf instead?
                            https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625

                            Change...
                            hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname

                            To...
                            hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname

                            I wasn't aware of that option.

                            Can you tell me why one solution is better than the other or why one is worse than the other?

                            Has long as dns is after files in the hosts: section in nsswitch.conf file, utilities like nslookup should work correctly.

                            Un-commenting the .local line in the other file seems to do the job just fine. Still not seeing any advantages to doing it the other way, or disadvantages to keep doing it how I am.

                            Only disadvantage or more of an inconvenience that I can see, is that you would have to keep changing the domain name because of each network uses a different domain like .local, .lan, or .home.

                            But I don't see anything wrong with un-commenting domain-name=local

                            stacksofplatesS 1 Reply Last reply Reply Quote 0
                            • stacksofplatesS
                              stacksofplates @black3dynamite
                              last edited by

                              @black3dynamite said in Fedora name resolution:

                              @obsolesce said in Fedora name resolution:

                              @black3dynamite said in Fedora name resolution:

                              @obsolesce said in Fedora name resolution:

                              @black3dynamite said in Fedora name resolution:

                              @obsolesce said in Fedora name resolution:

                              If it's a .local domain, edit the avahi-daemon.conf file:

                              Un-comment the following line, and add a . (dot) infront of local:

                              domain-name=.local

                              Then restart network or reboot.

                              Why not edit /etc/nsswitch.conf instead?
                              https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625

                              Change...
                              hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname

                              To...
                              hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname

                              I wasn't aware of that option.

                              Can you tell me why one solution is better than the other or why one is worse than the other?

                              Has long as dns is after files in the hosts: section in nsswitch.conf file, utilities like nslookup should work correctly.

                              Un-commenting the .local line in the other file seems to do the job just fine. Still not seeing any advantages to doing it the other way, or disadvantages to keep doing it how I am.

                              Only disadvantage or more of an inconvenience that I can see, is that you would have to keep changing the domain name because of each network uses a different domain like .local, .lan, or .home.

                              But I don't see anything wrong with un-commenting domain-name=local

                              Right, /etc/nsswitch defines where you're looking. So correcting that fixes all scenarios vs fixing only one specific thing.

                              ObsolesceO 1 Reply Last reply Reply Quote 1
                              • ObsolesceO
                                Obsolesce @stacksofplates
                                last edited by

                                @stacksofplates said in Fedora name resolution:

                                @black3dynamite said in Fedora name resolution:

                                @obsolesce said in Fedora name resolution:

                                @black3dynamite said in Fedora name resolution:

                                @obsolesce said in Fedora name resolution:

                                @black3dynamite said in Fedora name resolution:

                                @obsolesce said in Fedora name resolution:

                                If it's a .local domain, edit the avahi-daemon.conf file:

                                Un-comment the following line, and add a . (dot) infront of local:

                                domain-name=.local

                                Then restart network or reboot.

                                Why not edit /etc/nsswitch.conf instead?
                                https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625

                                Change...
                                hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname

                                To...
                                hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname

                                I wasn't aware of that option.

                                Can you tell me why one solution is better than the other or why one is worse than the other?

                                Has long as dns is after files in the hosts: section in nsswitch.conf file, utilities like nslookup should work correctly.

                                Un-commenting the .local line in the other file seems to do the job just fine. Still not seeing any advantages to doing it the other way, or disadvantages to keep doing it how I am.

                                Only disadvantage or more of an inconvenience that I can see, is that you would have to keep changing the domain name because of each network uses a different domain like .local, .lan, or .home.

                                But I don't see anything wrong with un-commenting domain-name=local

                                Right, /etc/nsswitch defines where you're looking. So correcting that fixes all scenarios vs fixing only one specific thing.

                                I see, that makes sense. I'll try that next time.... because my host name and the LAN domain I connect to never changes.

                                1 Reply Last reply Reply Quote 0
                                • ObsolesceO
                                  Obsolesce @black3dynamite
                                  last edited by

                                  @black3dynamite said in Fedora name resolution:

                                  @obsolesce said in Fedora name resolution:

                                  If it's a .local domain, edit the avahi-daemon.conf file:

                                  Un-comment the following line, and add a . (dot) infront of local:

                                  domain-name=.local

                                  Then restart network or reboot.

                                  Why not edit /etc/nsswitch.conf instead?
                                  https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625

                                  Change...
                                  hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname

                                  To...
                                  hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname

                                  That didn't work by the way.

                                  This did:
                                  hosts: files dns myhostname mymachines

                                  black3dynamiteB 1 Reply Last reply Reply Quote 0
                                  • ObsolesceO
                                    Obsolesce
                                    last edited by

                                    It still didn't work correctly in VSCode, but did allow me to ping a .local.

                                    I think the avahi-daemon.conf is the better way to fix it, as all issues are resolved that way, and no new ones arise down the road.

                                    black3dynamiteB 1 Reply Last reply Reply Quote 0
                                    • black3dynamiteB
                                      black3dynamite @Obsolesce
                                      last edited by

                                      @obsolesce said in Fedora name resolution:

                                      @black3dynamite said in Fedora name resolution:

                                      @obsolesce said in Fedora name resolution:

                                      If it's a .local domain, edit the avahi-daemon.conf file:

                                      Un-comment the following line, and add a . (dot) infront of local:

                                      domain-name=.local

                                      Then restart network or reboot.

                                      Why not edit /etc/nsswitch.conf instead?
                                      https://ask.fedoraproject.org/en/question/90486/cannot-resolve-local-domain-name-on-fedora-23/?answer=90625#post-id-90625

                                      Change...
                                      hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname

                                      To...
                                      hosts: files dns mdns4_minimal [NOTFOUND=return] myhostname

                                      That didn't work by the way.

                                      This did:
                                      hosts: files dns myhostname mymachines

                                      I noticed on a clean install of Fedora 28, its setup this way:
                                      hosts: files dns myhostname

                                      1 Reply Last reply Reply Quote 0
                                      • black3dynamiteB
                                        black3dynamite @Obsolesce
                                        last edited by

                                        @obsolesce said in Fedora name resolution:

                                        It still didn't work correctly in VSCode, but did allow me to ping a .local.

                                        What didn't work in VSCode?

                                        1 Reply Last reply Reply Quote 0
                                        • siringoS
                                          siringo
                                          last edited by

                                          Thank you all for your help with this problem.

                                          I had this problem at a site I work at once a week. I went back there yesterday and things worked without me having to do anything so I don't know what was going on.

                                          Anyway, all fixed & once again thanks.

                                          stacksofplatesS 1 Reply Last reply Reply Quote 0
                                          • stacksofplatesS
                                            stacksofplates @siringo
                                            last edited by

                                            @siringo said in Fedora name resolution:

                                            Thank you all for your help with this problem.

                                            I had this problem at a site I work at once a week. I went back there yesterday and things worked without me having to do anything so I don't know what was going on.

                                            Anyway, all fixed & once again thanks.

                                            Yeah we have a pretty big .local and I've never had to change anything for it.

                                            Hopefully it stays working for you.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post