Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    (solved) 2.5 connecting via hostname not working across interfaces

    Scheduled Pinned Locked Moved DHCP and DNS
    47 Posts 4 Posters 7.0k 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.
    • GertjanG
      Gertjan @Bob.Dig
      last edited by Gertjan

      @bob-dig

      My turn :
      I don't have a local host name called 'mail', but I have one called 'diskstation2' :

      C:\Users\Gauche>nslookup
      Serveur par dÚfaut :   pfsense.my-domain.net
      Address:  2001:470:1f13:5c0:2::1
      
      > set querytype=A
      > set debug
      > diskstation2
      Serveur :   pfsense.my-domain.net
      Address:  2001:470:1f13:5c0:2::1
      
      ------------
      Got answer:
          HEADER:
              opcode = QUERY, id = 2, rcode = NOERROR
              header flags:  response, auth. answer, want recursion, recursion avail.
              questions = 1,  answers = 1,  authority records = 0,  additional = 0
      
          QUESTIONS:
              diskstation2.my-domain, type = A, class = IN
          ANSWERS:
          ->  diskstation2.my-domain.net
              internet address = 192.168.1.33
              ttl = 3600 (1 hour)
      
      ------------
      Nom :    diskstation2.my-domain.net
      Address:  192.168.1.33
      
      >
      
      C:\Users\Gauche>ipconfig -all
      
      Configuration IP de Windows
      
         Nom de l’hôte . . . . . . . . . . : Gauche2
      ......
         Liste de recherche du suffixe DNS.: my-domain.net
      
      Carte Ethernet Ethernet :
      
         Suffixe DNS propre à la connexion. . . : my-domain.net
         Description. . . . . . . . . . . . . . : Intel(R) Ethernet Connection (11) I219-LM
         Adresse physique . . . . . . . . . . . : A4-BB-AC-BA-16-A1
         DHCP activé. . . . . . . . . . . . . . : Oui
         Configuration automatique activée. . . : Oui
         Adresse IPv6. . . . . . . . . . . . . .: 2001:470:beef:5c0:2::c7(prefered)
         Bail obtenu. . . . . . . . . . . . . . : mercredi 10 mars 2021 06:51:57
         Bail expirant. . . . . . . . . . . . . : jeudi 11 mars 2021 10:04:47
         Adresse IPv6 de liaison locale. . . . .: fe80::410c:5e0d:e1a1:6075%10(prefered)
         Adresse IPv4. . . . . . . . . . . . . .: 192.168.1.6(prefered)
         Masque de sous-réseau. . . . . . . . . : 255.255.255.0
         Bail obtenu. . . . . . . . . . . . . . : mercredi 10 mars 2021 08:18:04
         Bail expirant. . . . . . . . . . . . . : vendredi 12 mars 2021 00:38:52
         Passerelle par défaut. . . . . . . . . : fe80::215:17ff:fe77:d118%10
                                             192.168.1.1
         Serveur DHCP . . . . . . . . . . . . . : 192.168.1.1
         IAID DHCPv6 . . . . . . . . . . . : 111459181
         DUID de client DHCPv6. . . . . . . . : 00-01-00-01-26-AC-DF-8D-BB-BB-6D-BA-16-A1
         Serveurs DNS. . .  . . . . . . . . . . : 2001:470:1f13:5c0:2::1
                                             192.168.1.1
      

      Your 'unbound' doesn't know it lives in "home.arpa" so it should (should it ?) try also
      mail.home.arpa
      which should be in the /etc/hosts file on pfSense, thus known to unbound, as it reads /etc/hosts at start-up.
      IF not, give that host called 'mail' a static DHCP MAC lease **, or host override it on the unbound settings page.

      ** and keep this checked :
      8e8d861d-84e6-4161-b17b-c9abece68f3d-image.png

      edit : I'm not using a domain like "home.arpa". As I need known 'cert' on my LAN, I use a 'real' (rented) domain name for internal uses and acme. I don't think that difference matters.

      My unbound knows that :diskstaion2 is local, as it is definced in /etc/hosts/

      .....
      192.168.1.33	DiskStation2.my-domain.net DiskStation2
      ....
      

      Strange to see that unbound even bothers a main root server with a non valid host name like 'mail'.

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      Bob.DigB 1 Reply Last reply Reply Quote 0
      • Bob.DigB
        Bob.Dig LAYER 8 @Gertjan
        last edited by

        @gertjan Bonjour.
        They all got a static mapping and this box is checked all the time.
        So still no clue why this behavior changed and now has changed again.
        C’est la vie...

        GertjanG 1 Reply Last reply Reply Quote 0
        • GertjanG
          Gertjan @Bob.Dig
          last edited by

          @bob-dig said in [solved] 2.5 connecting via hostname not working across interfaces:

          C’est la vie...

          Coté fichier /etc/hosts : toutes tes hôtes y figurent ?

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          Bob.DigB 1 Reply Last reply Reply Quote 0
          • Bob.DigB
            Bob.Dig LAYER 8 @Gertjan
            last edited by

            @gertjan I think we were there already.
            Adieu 😉

            GertjanG 1 Reply Last reply Reply Quote 1
            • GertjanG
              Gertjan @Bob.Dig
              last edited by Gertjan

              @bob-dig

              I knew it. The question sounded familiar 😊

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

              1 Reply Last reply Reply Quote 0
              • Bob.DigB
                Bob.Dig LAYER 8
                last edited by

                I have to bring that up because it is an ongoing problem. Sometimes it works over other interfaces, sometimes it doesn't.

                1 Reply Last reply Reply Quote 0
                • Bob.DigB
                  Bob.Dig LAYER 8
                  last edited by

                  I enabled Register DHCP leases in the DNS Resolver in addition to the already enabled Register DHCP static mappings in the DNS Resolver and now it is working again, before even FQDN wasn't working. It is a mess.

                  1 Reply Last reply Reply Quote 0
                  • Bob.DigB
                    Bob.Dig LAYER 8
                    last edited by Bob.Dig

                    I noticed that sometimes my windows can't connect even if via ip it is possible and even the dns resolution is working according to nslookup. It is making no sense to me.

                    johnpozJ 1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator @Bob.Dig
                      last edited by

                      Are you IPs changing? This isn't freaking rocket science ;) But it does require some basic understanding of dns and networking..

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                      Bob.DigB 1 Reply Last reply Reply Quote 0
                      • Bob.DigB
                        Bob.Dig LAYER 8 @johnpoz
                        last edited by Bob.Dig

                        @johnpoz They don't change but the windows smb shares don't work anymore, unreachable, although via IP it is working.
                        But I don't know what the reason is, an ARP problem maybe? It is two Windows PCs across different interfaces.

                        But I just noticed that the problem was different when I started this thread. It somehow looks related to me but it might not be.

                        johnpozJ 1 Reply Last reply Reply Quote 0
                        • johnpozJ
                          johnpoz LAYER 8 Global Moderator @Bob.Dig
                          last edited by

                          Well troubleshoot the problem - if its not working via IP, it has zero to do with name resolution.

                          Sniff - what happens.. Does pfsense send on the syn.. Then its not pfsense..

                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                          If you get confused: Listen to the Music Play
                          Please don't Chat/PM me for help, unless mod related
                          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                          Bob.DigB 1 Reply Last reply Reply Quote 0
                          • Bob.DigB
                            Bob.Dig LAYER 8 @johnpoz
                            last edited by Bob.Dig

                            @johnpoz It always does work with IP, names some of the time.
                            But to my later problem, I had ACL one machine to use the resolver only for local stuff. Maybe windows will not use it anymore and will favor the other... hard to tell. I switched to ip and will stay there, at least in that vm.
                            The original problem, RDP just over the hostname seems gone, it always works so, even across interfaces.

                            johnpozJ 1 Reply Last reply Reply Quote 0
                            • johnpozJ
                              johnpoz LAYER 8 Global Moderator @Bob.Dig
                              last edited by

                              @bob-dig said in 2.5 connecting via hostname not working across interfaces:

                              I had ACL one machine to use the resolver only for local stuff.

                              Huh? How exactly do you think that could work? While sure you can set the ACL to only be able to resolve local stuff. How would that client then resolve public stuff? You can't just point a client to 2 different NS that resolve different things and not have problems.

                              An intelligent man is sometimes forced to be drunk to spend time with his fools
                              If you get confused: Listen to the Music Play
                              Please don't Chat/PM me for help, unless mod related
                              SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                              Bob.DigB 1 Reply Last reply Reply Quote 0
                              • Bob.DigB
                                Bob.Dig LAYER 8 @johnpoz
                                last edited by

                                @johnpoz It worked for some time... but it is probably the reason for the latest problems.

                                1 Reply Last reply Reply Quote 0
                                • Bob.DigB
                                  Bob.Dig LAYER 8
                                  last edited by Bob.Dig

                                  I once again had to reinstall a fresh pfSense and guess what is not working again, RDP only via hostname.
                                  But it seems related to using DHCP on my Windows. If I am using DHCP for IPv4, I can connect via hostname. If I dial-in the same settings manually, I only can connect via FQDN.
                                  So it is all a windows "thingy". Weird but now I know at least this.

                                  johnpozJ 1 Reply Last reply Reply Quote 0
                                  • johnpozJ
                                    johnpoz LAYER 8 Global Moderator @Bob.Dig
                                    last edited by

                                    @bob-dig You can not resolve just hostname unless you are on the same L2 and broadcast for it.

                                    If you actually setup your network correctly be able to resolve everything via FQDN, and your window devices would auto add the domain your using locally via domain suffix.

                                    This is a layer 8 issue...

                                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                                    If you get confused: Listen to the Music Play
                                    Please don't Chat/PM me for help, unless mod related
                                    SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                                    Bob.DigB 1 Reply Last reply Reply Quote 0
                                    • Bob.DigB
                                      Bob.Dig LAYER 8 @johnpoz
                                      last edited by Bob.Dig

                                      @johnpoz said in (solved) 2.5 connecting via hostname not working across interfaces:

                                      This is a layer 8 issue...

                                      I got you.

                                      But there is still one missing puzzle peace. Why the heck it will work after some time (weeks), even if I dialed in the settings my self only in the first window of the IPv4 Properties, missing out on the DNS suffix field? Only Windows knows.

                                      johnpozJ 1 Reply Last reply Reply Quote 0
                                      • johnpozJ
                                        johnpoz LAYER 8 Global Moderator @Bob.Dig
                                        last edited by

                                        @bob-dig said in (solved) 2.5 connecting via hostname not working across interfaces:

                                        missing out on the DNS suffix field? Only Windows knows.

                                        Huh?? Sorry I can not make any sense of that... You either broadcast for a hostname, or you resolve a fqdn.. There is no "puzzle" to it..

                                        An intelligent man is sometimes forced to be drunk to spend time with his fools
                                        If you get confused: Listen to the Music Play
                                        Please don't Chat/PM me for help, unless mod related
                                        SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                                        Bob.DigB 1 Reply Last reply Reply Quote 0
                                        • Bob.DigB
                                          Bob.Dig LAYER 8 @johnpoz
                                          last edited by

                                          @johnpoz said in (solved) 2.5 connecting via hostname not working across interfaces:

                                          There is no "puzzle" to it..

                                          Riddle me this. Why is it for some time not working and later it is?

                                          johnpozJ 1 Reply Last reply Reply Quote 0
                                          • johnpozJ
                                            johnpoz LAYER 8 Global Moderator @Bob.Dig
                                            last edited by johnpoz

                                            @bob-dig said in (solved) 2.5 connecting via hostname not working across interfaces:

                                            Riddle me this. Why is it for some time not working and later it is?

                                            Have no freaking idea what your setup is... I can tell you this - YOU CAN NOT resolve a hostname from dns, it has to be fully qualified... That is how dns works.

                                            I have no idea what your actually doing, or how your network is setup or what your trying to resolve and how.

                                            For all we know why it some times worked and sometimes didn't is you had your client pointing to 2 different dns, and when it asked pfsense for host.domain.tld it worked, and when it asked your external dns it failed because it has no clue to your local domain.

                                            You can not control what NS a client might ask when there is more than one..

                                            What I can tell you is if setup correctly you could always resolve all your resources via just putting in a hostname because the client would auto added the suffix for whatever domain your using locally.. And now you have zero issues and can always resolve..

                                            here I just put in nas, and it actually resolve the fqdn nas.local.lan because my client auto does that dns lookup by auto adding the suffix.

                                            C:\>ping nas
                                            
                                            Pinging nas.local.lan [192.168.9.10] with 32 bytes of data:
                                            Reply from 192.168.9.10: bytes=32 time<1ms TTL=64
                                            

                                            Here is it doing the fqdn query, even though I only used nas

                                            fqdn.png

                                            suffix
                                            suffix.png

                                            An intelligent man is sometimes forced to be drunk to spend time with his fools
                                            If you get confused: Listen to the Music Play
                                            Please don't Chat/PM me for help, unless mod related
                                            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                                            JeGrJ 1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.