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

Can't access SMB share via SMB name but can access via IP.

DHCP and DNS
7
16
3.8k
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.
  • Y
    Yoe777
    last edited by Nov 12, 2022, 12:38 AM

    I have a NAS with SMB share on a separate interface than my devices that have firewall rules setup to access it. There are NO issues with me accessing the NAS shares via IP address from any interface however when attempting to access the NAS shares via SMB name in Linux or Windows it fails.

    I have enabled the DNS Forwarder, DHCP Registration and Static DHCP.

    What else am I missing?

    Thanks,

    J 1 Reply Last reply Nov 12, 2022, 10:29 AM Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator @Yoe777
      last edited by johnpoz Nov 12, 2022, 10:33 AM Nov 12, 2022, 10:29 AM

      @yoe777 said in Can't access SMB share via SMB name but can access via IP.:

      access the NAS shares via SMB name

      you mean via just host vs a fqdn?

      Like nas vs nas.something.tld ?

      If that is the case and your nas is on another network then your client, that is to be expected - broadcasting for names doesn't work across vlans.

      If your wanting to access via name, then you need to make sure your search suffix on your client auto adds your domain when doing a query.. Or just use the fqdn..

      example, if I ping just nas, it comes back as fully qualified.

      $ 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
      

      Because my client auto adds that in the dns query.

      $ ipconfig /all                                            
                                                                 
      Windows IP Configuration                                   
                                                                 
         Host Name . . . . . . . . . . . . : i9-win              
         Primary Dns Suffix  . . . . . . . : local.lan           
         Node Type . . . . . . . . . . . . : Broadcast           
         IP Routing Enabled. . . . . . . . : No                  
         WINS Proxy Enabled. . . . . . . . : No                  
         DNS Suffix Search List. . . . . . : local.lan           
      

      See the DNS Suffix Search List.

      if I set debug in nslookup, notice what it actually asked for, even though I only used the hostname nas

      $ nslookup                                                                                 
      Default Server:  pi.hole                                                                   
      Address:  192.168.3.10                                                                     
                                                                                                 
      > set debug                                                                                
      > nas                                                                                      
      Server:  pi.hole                                                                           
      Address:  192.168.3.10                                                                     
                                                                                                 
      ------------                                                                               
      Got answer:                                                                                
          HEADER:                                                                                
              opcode = QUERY, id = 2, rcode = NOERROR                                            
              header flags:  response, want recursion, recursion avail.                          
              questions = 1,  answers = 1,  authority records = 0,  additional = 0               
                                                                                                 
          QUESTIONS:                                                                             
              nas.local.lan, type = A, class = IN                                                
          ANSWERS:                                                                               
          ->  nas.local.lan                                                                      
              internet address = 192.168.9.10                                                    
              ttl = 3383 (56 mins 23 secs)                                                       
                                                                                                 
      ------------                                                                               
      Non-authoritative answer:                                                                  
      ------------                                                                               
      Got answer:                                                                                
          HEADER:                                                                                
              opcode = QUERY, id = 3, rcode = NOERROR                                            
              header flags:  response, auth. answer, want recursion, recursion avail.            
              questions = 1,  answers = 0,  authority records = 0,  additional = 0               
                                                                                                 
          QUESTIONS:                                                                             
              nas.local.lan, type = AAAA, class = IN                                             
                                                                                                 
      ------------                                                                               
      Name:    nas.local.lan                                                                     
      Address:  192.168.9.10                                                                     
                                                                                                 
      >                                                                                          
      

      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 0
      • Y
        Yoe777
        last edited by Nov 12, 2022, 1:34 PM

        I am not using VLANS I am using physical interfaces with firewall rules allowing access to the NAS server.

        My ipconfig /all output:

        login-to-view

        If I try to access my NAS in explorer via:
        "\nas\sharename"

        I get this error:

        login-to-view

        Or Linux via:
        "smb://nas/sharename"

        I get this error:

        login-to-view

        Could it be because my Primary Dns Suffix is missing?

        There are no issues connecting via IP.

        J Y 2 Replies Last reply Nov 12, 2022, 1:40 PM Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator @Yoe777
          last edited by Nov 12, 2022, 1:40 PM

          @yoe777 said in Can't access SMB share via SMB name but can access via IP.:

          sing physical interfaces with firewall

          Same thing, its a different network..

          if you ping nas - does it come back as nas.local.lan? Broadcasting for just a hostname or netbios name doesn't work across networks.. They have to be in the same network for that to work.

          Use the fqdn nas.local.lan as you have shown your using local.lan as well..

          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

          J B 2 Replies Last reply Nov 12, 2022, 1:50 PM Reply Quote 0
          • J
            Jarhead @johnpoz
            last edited by Nov 12, 2022, 1:50 PM

            Or add it to your hosts file on the computer.

            1 Reply Last reply Reply Quote 0
            • B
              Bob.Dig LAYER 8 @johnpoz
              last edited by Nov 12, 2022, 2:04 PM

              @johnpoz pfSense is adding it for me again on its own? So I will never get that, when it is working or not.

              PS C:\Users\Bobby> nslookup Rebel12
              Server:  pfsense.home.arpa
              Address:  192.168.10.1
              
              Name:    Rebel12.home.arpa
              Addresses:  192.168.11.20
                        192.168.9.20
              
              
              J 1 Reply Last reply Nov 12, 2022, 2:12 PM Reply Quote 0
              • J
                johnpoz LAYER 8 Global Moderator @Bob.Dig
                last edited by johnpoz Nov 12, 2022, 2:13 PM Nov 12, 2022, 2:12 PM

                @bob-dig home.arpa is the new default. I had set local.lan long time ago and have not completely moved to it yet.

                But yes your domain should be added to your windows clients via dhcp

                Why is your fqdn coming back with 2 ips, that is not ideal.

                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 Nov 12, 2022, 2:13 PM Reply Quote 1
                • B
                  Bob.Dig LAYER 8 @johnpoz
                  last edited by Nov 12, 2022, 2:13 PM

                  @johnpoz Ah ok, that was the difference, when I was not using DHCP, thx.

                  1 Reply Last reply Reply Quote 0
                  • Y
                    Yoe777 @Yoe777
                    last edited by Yoe777 Nov 12, 2022, 7:52 PM Nov 12, 2022, 7:51 PM

                    @yoe777 login-to-view

                    My main issue is a media player trying to access the broadcasted hostname, I cannot lookup shares via IP on it. Is there a way to enter a static entry directly in pfsense that will redirect the hostname to the IP?

                    Y 1 Reply Last reply Nov 12, 2022, 9:09 PM Reply Quote 0
                    • Y
                      Yoe777 @Yoe777
                      last edited by Yoe777 Nov 12, 2022, 9:11 PM Nov 12, 2022, 9:09 PM

                      @yoe777

                      I am a little bit closer by creating a Host Override Static entry under ServicesDNS -> ResolverGeneral -> Settings. My windows machines and linux can access my NAS via hostname now from manual searching for it.

                      My media player still is not seeing the share on my NAS because the Hostname broadcast is not passing over the interface. You cannot manually place an search entry it only lists the broadcasted names.

                      Any suggestions as a work around?

                      J M S 3 Replies Last reply Nov 12, 2022, 10:21 PM Reply Quote 0
                      • J
                        johnpoz LAYER 8 Global Moderator @Yoe777
                        last edited by johnpoz Nov 12, 2022, 10:22 PM Nov 12, 2022, 10:21 PM

                        @yoe777 your media player - which is what exactly is most likely doing some sort of discovery - that is not going to work on a different network.

                        What are you trying play? I use my plex specifically on a different network than my players.. It doesn't have to use discovery - it uses a fqdn to know where the server is.

                        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 0
                        • M
                          MLH01 @Yoe777
                          last edited by MLH01 Dec 17, 2022, 5:57 AM Dec 17, 2022, 5:55 AM

                          @yoe777 I had a similar issue with accessing my NAS smb shares. My NAS is running TrueNAS CORE. Like you, I added a host override in pfSense (under Services > DNS Resolver > General Settings).

                          NAS details:
                          Network: VLAN10 (192.168.10.x)
                          Hostname: truenas
                          Parent domain: local

                          I was then able to access and map the shares on my Windows computers connected on my default LAN (192.168.1.x) using \\truenas.local[sharename]. I was able to access the shares on my Mac mini the same way.

                          I use MediaPortal for my media server, also located on the default LAN. I still needed to manually set the media source paths (using \\truenas.local[sharename]) as it wasn't able to locate truenas shares on the network by itself. Let me know if you have the same media server and I will post instructions.

                          M 1 Reply Last reply Dec 17, 2022, 8:36 AM Reply Quote 0
                          • M
                            MLH01 @MLH01
                            last edited by MLH01 Dec 17, 2022, 8:39 AM Dec 17, 2022, 8:36 AM

                            Note: I meant to write \\truenas.local[backslash][sharename] above. The backslashes don't seem to work...

                            1 Reply Last reply Reply Quote 0
                            • S
                              skogs @Yoe777
                              last edited by Dec 20, 2022, 3:51 AM

                              @yoe777
                              Frequently those media player apps on a roku or even the service/host discovery on windows doesn't use SMB to find the information. It uses multicast mdns/avahi/servicediscovery/bonjour/whatever. It is expecting to find things automatically with a 224.x.x.x broadcast ip.
                              You might need to add a rule for networks...not sure if the stopping point is pfsense or some other host based firewall but the idea is:

                              src: any/lan
                              destination: 224.0.0.251
                              destination port 5353

                              (at least that is the mdns traffic I see on my network...guessing yours is similar.

                              R 1 Reply Last reply Dec 20, 2022, 3:53 AM Reply Quote 0
                              • R
                                rcoleman-netgate Netgate @skogs
                                last edited by Dec 20, 2022, 3:53 AM

                                @skogs opening 5353 in that manner won't pass multicast traffic -- that's unroutable.

                                AVAHI will do mdns passing between interfaces.

                                Ryan
                                Repeat, after me: MESH IS THE DEVIL! MESH IS THE DEVIL!
                                Requesting firmware for your Netgate device? https://go.netgate.com
                                Switching: Mikrotik, Netgear, Extreme
                                Wireless: Aruba, Ubiquiti

                                S 1 Reply Last reply Dec 20, 2022, 4:56 AM Reply Quote 0
                                • S
                                  skogs @rcoleman-netgate
                                  last edited by Dec 20, 2022, 4:56 AM

                                  @rcoleman-netgate
                                  yaya ^^ that thing.

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