• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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.
  • B
    Bob.Dig LAYER 8
    last edited by Bob.Dig Jun 30, 2021, 6:17 PM Feb 28, 2021, 7:05 PM

    Not sure if this is the right place.
    I used to connect RDP via hostname, this has always worked for me with 2.4.5.
    Now with a fresh 2.5 it works only on the same interface.
    I could add the domain under general setup and that works, but I am curious why it is not working with hostname only between different interfaces anymore.

    J 1 Reply Last reply Feb 28, 2021, 8:00 PM Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator @Bob.Dig
      last edited by Feb 28, 2021, 8:00 PM

      broadcasting for a name isn't going to work across networks. Did you have some other avhai or pimd working for discovery?

      Did you change the domain - so your clients are no longer adding suffix to a search when you use just a host name.

      dns always has to be fully qualified to resolve..

      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

      B 1 Reply Last reply Feb 28, 2021, 9:20 PM Reply Quote 1
      • B
        Bob.Dig LAYER 8 @johnpoz
        last edited by Feb 28, 2021, 9:20 PM

        @johnpoz No, just installed pfsense from the get go. Don't know why it worked before.

        J 1 Reply Last reply Feb 28, 2021, 9:35 PM Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator @Bob.Dig
          last edited by Feb 28, 2021, 9:35 PM

          What was your old version of pfsense? Long time ago dns would resolve just hostnames - but that bug was removed back 2.x something.. Multiple versions back..

          If you want to resolve by just putting in hostname, set your device to use search suffix for the domain your using..

          example..

          $ 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
          

          See how it comes back fully qualified while just using nas.. Because the OS is auto adding local.lan when it does the dns query..

          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

          B 1 Reply Last reply Mar 1, 2021, 8:05 AM Reply Quote 0
          • B
            Bob.Dig LAYER 8 @johnpoz
            last edited by Mar 1, 2021, 8:05 AM

            @johnpoz Always used the most recent version and my client is Windows without a domain. And I changed the domain in 2.4.5p1 to home.arpa already and that hostname only thing still has worked for my. So the only thing changed was a fresh install of pfSense version 2.5!
            If I remember correct you had to do a reboot on pfSense to get this working, after adding the static mappings in the DHCP server.

            G 1 Reply Last reply Mar 1, 2021, 8:13 AM Reply Quote 0
            • G
              Gertjan @Bob.Dig
              last edited by Mar 1, 2021, 8:13 AM

              @bob-dig

              cat /etc/hosts

              Is the devices to which you RDP-connect listed ?

              I can (pfSense 2.5.0) use host names :

              ba63914b-a5ca-499b-9014-01e3cf750263-image.png

              No need to use the hostname.network.tld format, although that works to.

              Btw : the device I RDP to have static DJCP MAC leases.

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

              B 1 Reply Last reply Mar 1, 2021, 8:19 AM Reply Quote 1
              • B
                Bob.Dig LAYER 8 @Gertjan
                last edited by Bob.Dig Mar 1, 2021, 8:21 AM Mar 1, 2021, 8:19 AM

                @gertjan Hey gertjan, they are listed with IP, domain name and hostname only and it is still not possible for me to connect via hostname only, if the target is on another interface/subnet. And that has worked before. Maybe it shouldn't work, then I am ok with it, I am open to change, but found it noteworthy.

                G 1 Reply Last reply Mar 1, 2021, 8:23 AM Reply Quote 0
                • G
                  Gertjan @Bob.Dig
                  last edited by Mar 1, 2021, 8:23 AM

                  @bob-dig

                  The /etc/hosts file is used to populate the local unbound resolve cache.
                  So, unbound knows about them.

                  Check for yourself, on the console :

                  dig @127.0.0.1 device
                  

                  It should give you the correct answer.

                  Now, dig (or nslookup) on the device from where you RDP from. Is DNS working ? If yes, it should resolve the hostname you are using to connect to.

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

                  B 1 Reply Last reply Mar 1, 2021, 8:38 AM Reply Quote 1
                  • B
                    Bob.Dig LAYER 8 @Gertjan
                    last edited by Bob.Dig Mar 1, 2021, 8:43 AM Mar 1, 2021, 8:38 AM

                    @gertjan It is not working like that in a fresh pfSense 2.5 I guess:

                    [2.5.0-RELEASE][admin@pfSense.home.arpa]/root: dig @127.0.0.1 mail
                    
                    ; <<>> DiG 9.16.11 <<>> @127.0.0.1 mail
                    ; (1 server found)
                    ;; global options: +cmd
                    ;; Got answer:
                    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 57206
                    ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
                    
                    ;; OPT PSEUDOSECTION:
                    ; EDNS: version: 0, flags:; udp: 512
                    ;; QUESTION SECTION:
                    ;mail.                          IN      A
                    
                    ;; AUTHORITY SECTION:
                    .                       3600    IN      SOA     a.root-servers.net.nstld.verisign-grs.com. 2021030100 1800 900 604800 86400
                    
                    ;; Query time: 7 msec
                    ;; SERVER: 127.0.0.1#53(127.0.0.1)
                    ;; WHEN: Mon Mar 01 09:33:29 CET 2021
                    ;; MSG SIZE  rcvd: 108
                    
                    [2.5.0-RELEASE][admin@pfSense.home.arpa]/root: dig @127.0.0.1 mail.home.arpa
                    
                    ; <<>> DiG 9.16.11 <<>> @127.0.0.1 mail.home.arpa
                    ; (1 server found)
                    ;; global options: +cmd
                    ;; Got answer:
                    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29863
                    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
                    
                    ;; OPT PSEUDOSECTION:
                    ; EDNS: version: 0, flags:; udp: 512
                    ;; QUESTION SECTION:
                    ;mail.home.arpa.                        IN      A
                    
                    ;; ANSWER SECTION:
                    mail.home.arpa.         3600    IN      A       192.168.92.10
                    
                    ;; Query time: 0 msec
                    ;; SERVER: 127.0.0.1#53(127.0.0.1)
                    ;; WHEN: Mon Mar 01 09:36:17 CET 2021
                    ;; MSG SIZE  rcvd: 59
                    
                    [2.5.0-RELEASE][admin@pfSense.home.arpa]/root:
                    
                    G 1 Reply Last reply Mar 1, 2021, 8:45 AM Reply Quote 0
                    • G
                      Gertjan @Bob.Dig
                      last edited by Mar 1, 2021, 8:45 AM

                      @bob-dig
                      See the image of mu RDP connect above, it lists my LAn device I 'RDP' to .

                      The full (local) domain name was needed :

                      [2.5.0-RELEASE][admin@pfsense.me.net]/boot/kernel: dig Bureau2 +short
                      [2.5.0-RELEASE][admin@pfsense.me.net]/boot/kernel: dig Bureau2.me.net +short
                      192.168.1.2
                      

                      From a windows device,it worked with the host name only :

                      C:\Users\Gauche>nslookup Bureau2
                      Serveur :   pfsense.me.net
                      Address:  2001:470:1f13:5c0:2::1
                      
                      Nom :    Bureau2.me.net
                      Addresses:  2001:470:1f13:5c0:2::88
                                192.168.1.2
                      

                      Probably because my Windows prefixes (appended ?) the local domain name.

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

                      B 1 Reply Last reply Mar 1, 2021, 8:50 AM Reply Quote 1
                      • B
                        Bob.Dig LAYER 8 @Gertjan
                        last edited by Bob.Dig Mar 1, 2021, 8:50 AM Mar 1, 2021, 8:50 AM

                        @gertjan It is not working here and my windows is not new. Host file is empty on it, just checked. And it had worked on the last days of the old pfSense, where I already changed the domain to home.arpa...

                        PS C:\WINDOWS\system32> nslookup mail
                        Server:  pfSense.home.arpa
                        Address:  192.168.1.1
                        
                        *** pfSense.home.arpa can't find mail: Non-existent domain
                        PS C:\WINDOWS\system32> nslookup mail.home.arpa
                        Server:  pfSense.home.arpa
                        Address:  192.168.1.1
                        
                        Name:    mail.home.arpa
                        Address:  192.168.92.10
                        
                        PS C:\WINDOWS\system32>
                        
                        G 1 Reply Last reply Mar 1, 2021, 9:07 AM Reply Quote 0
                        • G
                          Gertjan @Bob.Dig
                          last edited by Mar 1, 2021, 9:07 AM

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

                          and my windows is not new. Host file is empty on it,

                          The host file on windows == don't care.
                          I was talking about the hosts file of pfSense.

                          Make your Windows IPv4 DHCP "domain name aware" :

                          53008350-106b-42e6-866a-9a4cc471b6e9-image.png

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

                          B 1 Reply Last reply Mar 1, 2021, 9:11 AM Reply Quote 0
                          • B
                            Bob.Dig LAYER 8 @Gertjan
                            last edited by Mar 1, 2021, 9:11 AM

                            @gertjan Thanks for the solution.
                            Although it was not the point of my posting. 🙂

                            G 1 Reply Last reply Mar 1, 2021, 9:18 AM Reply Quote 0
                            • G
                              Gertjan @Bob.Dig
                              last edited by Mar 1, 2021, 9:18 AM

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

                              @gertjan Thanks for the solution.
                              Although it was not the point of my posting. 🙂

                              Ah, yes, the issue :

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

                              I used to connect RDP via hostname, this has always worked for me with 2.4.5.
                              Now with a fresh 2.5 it works only on the same interface.

                              Check :

                              Can you actually connect from 'a network' to 'another network' : check your firewall wall rules on the 'a network' interface.
                              Also : the system you RDP to accepts connection form the 'a network' ? and not only from its own network ?

                              I didn't detect any changes. I can still RDP into my 'local' systems using aremote VPN access etc.

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

                              B 1 Reply Last reply Mar 1, 2021, 9:21 AM Reply Quote 0
                              • B
                                Bob.Dig LAYER 8 @Gertjan
                                last edited by Bob.Dig Mar 1, 2021, 9:42 AM Mar 1, 2021, 9:21 AM

                                @gertjan RDP just works fine via FQDN, so it is the pfSense DNS-Resolver which now behaves differently, thanks to all our testing, I would say.

                                J 1 Reply Last reply Mar 1, 2021, 11:35 AM Reply Quote 0
                                • J
                                  johnpoz LAYER 8 Global Moderator @Bob.Dig
                                  last edited by johnpoz Mar 1, 2021, 11:37 AM Mar 1, 2021, 11:35 AM

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

                                  DNS-Resolver which now behaves differently

                                  Again what version of pfsense were you on?? 2.3.3 fixed the problem of resolving just hostnames.

                                  https://docs.netgate.com/pfsense/en/latest/releases/2-3-3.html#dns-resolver-forwarder
                                  Changed behavior of DNS Resolver overrides to only add FQDN entries, not short hostnames #6064

                                  That was Feb of 2017

                                  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

                                  B 1 Reply Last reply Mar 1, 2021, 11:41 AM Reply Quote 0
                                  • B
                                    Bob.Dig LAYER 8 @johnpoz
                                    last edited by Bob.Dig Mar 1, 2021, 11:46 AM Mar 1, 2021, 11:41 AM

                                    @johnpoz 2.4.5.p1, as I said, always the latest. So you say, it is not a bug, it is feature? I can't quite see it, but good to know.
                                    I think I started with pfSense with 2.4.4., but not sure exactly.
                                    The other change is I now use a gen2 VM instead of a gen1 VM and another NIC (Hyper-V).

                                    J 1 Reply Last reply Mar 1, 2021, 11:42 AM Reply Quote 0
                                    • J
                                      johnpoz LAYER 8 Global Moderator @Bob.Dig
                                      last edited by johnpoz Mar 1, 2021, 11:42 AM Mar 1, 2021, 11:42 AM

                                      It resolving just hostname was a bug yes.

                                      dns - to resolve it must be fqdn.

                                      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

                                      1 Reply Last reply Reply Quote 1
                                      • J
                                        JeGr LAYER 8 Moderator
                                        last edited by Mar 2, 2021, 8:22 AM

                                        Or another thing that could be the culprit would be the DHCP Domain added to your client. If that changed in your new install of 2.5 or you added VLANs and used different Domain parts in DHCP for those (vlan1.home.arpa, vlan2.home.arpa, lan.home.arpa etc) and/or your windows client didn't get the domain search path (or a new one), a lookup of "nslookup <name>" won't get resolved anymore. With domain search path set to "home.arpa" that should be extended to "<name>.home.arpa" and if that won't exist or is unknown to unbound, that won't get you far. I think there was some bug/problem with DHCP and different default domains or search paths per VLAN but I'm not entirely sure ;)

                                        But setting the domain search path in DHCP (or manually adding the suffix as Gertjan pointed out on the client itself) should let Windows resolve hostnames only

                                        Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

                                        If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

                                        B 1 Reply Last reply Mar 2, 2021, 8:32 AM Reply Quote 1
                                        • B
                                          Bob.Dig LAYER 8 @JeGr
                                          last edited by Bob.Dig Mar 2, 2021, 8:32 AM Mar 2, 2021, 8:32 AM

                                          @jegr Definitely did none of those things before and now.

                                          But RDP-Client is very sticky with targets anyway so there will be no discomfort once I have all of them in there and I deleted all hostnames. 😉

                                          1 Reply Last reply Reply Quote 0
                                          6 out of 47
                                          • First post
                                            6/47
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received