[Solved] SMB Connect to //COMPUTERNAME on LAN from WLAN?
-
Hello,
I am new here on the forum and also new to pfSense.
I have an unraid server that I've used for a long time and I've always connected to it via "http://SERVERNAME" in the web and I used to have mounted some SMB-drives via "//SERVERNAME/Games" and "//SERVERNAME/Movies" and so on.
Though now I cannot use the server's name to reach my server via web nor mount SMB drives. I have managed to get my PC to connect from WLAN to the LAN and I can reach my server by typing "http://192.168.1.8" but not by "http://SERVERNAME"
How could I get this to work?
Thanks in advanceSincerely,
~TrueType -
use the FQDN (fully qualified domain name) of the server.. What domain are you running locally?
I use local.lan for example… So my file server is called storage.local.lan
Your search suffix should allow you to ping by name and get back fqdn..
-
use the FQDN (fully qualified domain name) of the server.. What domain are you running locally?
Thanks for reply, I am unsure, but I believe I am not using any domain locally?
I have just set up pfSense with WAN, LAN and WLAN and made my unraid server use a static ip 192.168.1.8. -
And what domain did you setup on pfsense? See pic
What does your windows machines show for their domain - do a ipconfig /all, what do they show for their search suffix?
No matter what these are using you can create a host override in pfsense for your servername and add a domain you want… Lets say mydomain.lan -- you could then hit your server via servername.mydomain.lan
Just setup somedomain.tld to point to my storage box.. As you can see can access the file shares via either name.
-
And what domain did you setup on pfsense? See pic
What does your windows machines show for their domain - do a ipconfig /all, what do they show for their search suffix?
I will check this when I get home from work later today, thanks.
But if I understood you correctly, and if I configure pfSense this way I cannot use "//SERVERNAME" as I have all my docker plugins configured today, instead I need to reconfigure everything to go for example "//SERVERNAME.mydomain.lan".
If that is the case, I wonder if there is anyway for me to still use only "//SERVERNAME" as I did with my last router? -
Pfsense use to just automatic return the host name even when queried without a domain, or not a FQDN.. But this was corrected a while back version 2.2 I believe since its an invalid configuration for dns. DNS is not suppose to return an answer to just a hostname.. The query needs to be fully qualified.
Other ways for just \servername to work is broadcast. Ie your devices on the same network. Or you could setup wins that is available from all your networks to return such netbios queries..
The correct solution to name resolution is to correctly setup your domain(s) you to use on your local network and then access your devices via fully qualified queries. If your just too lazy to use fqdn if you correctly setup search domains on your devices they will auto add the domain your devices are in when you just put in a hostname.
but accessing anything via just hostname be it via smb \hosname or http:\hostname is bad practice and should be discouraged and avoided..
Understanding how name resolution works is a big part in running a network anywhere.
Pfsense can auto be setup to add your dhcp clients into the domain your using on pfsense, your static/dchp reservations or if your setting devices IP static on the device you can always just use the host override feature in either forwarder or unbound (resolver) to point fqdn to any IP..
-
Other ways for just \servername to work is broadcast. Ie your devices on the same network.
The correct solution to name resolution is to correctly setup your domain(s) you to use on your local network and then access your devices via fully qualified queries. If your just too lazy to use fqdn if you correctly setup search domains on your devices they will auto add the domain your devices are in when you just put in a hostname.
Understanding how name resolution works is a big part in running a network anywhere.
Hey again, so I am home now and I am running the default domain in pfsense which is "localdomain".
I would like to learn how to set it up correctly, if that is with FQDN. Is there a guide somewhere to do this that you know of?
Tried to add my server in the Firewall/Aliases/IP but that didn't work, so I opened all the ports that I could find that use SMB and forwarded them but that didn't work either. See pic
The only thing that worked was adding it in the host override in the DNS Resolver as you mentioned in the end. So it works for now, thanks :) But I'd like to learn the correct way
-
Why would you port forward?
There is no reason to do that.. Nor would you have to create any sort of alias or firewall rules for devices on the same network this 192.168.1/24 to talk to each other.
You can use whatever domain you want, not a fan of the single label domains like host.localdomain.. Something like host.local.domain would be better. Stay away from tld of .domains since this is one of the newer valid tlds..
Once you have set the domain name in pfsense, you can set your resolver or forwarder to register dhcp leases it hands out, or static reservations you setup, etc. Or you can just use the host overrides with their valid name.. Guess untrue was not its real hostname?
Then check your devices that they are using the domain you setup as their search suffix..
-
Why would you port forward?
There is no reason to do that.. Nor would you have to create any sort of alias or firewall rules for devices on the same network this 192.168.1/24 to talk to each other.
You can use whatever domain you want, not a fan of the single label domains like host.localdomain.. Something like host.local.domain would be better. Stay away from tld of .domains since this is one of the newer valid tlds..
Once you have set the domain name in pfsense, you can set your resolver or forwarder to register dhcp leases it hands out, or static reservations you setup, etc. Or you can just use the host overrides with their valid name.. Guess untrue was not its real hostname?
Then check your devices that they are using the domain you setup as their search suffix..
haha, I don't know why I did a port forward (NAT), I'm super new to this so I experimented. But my thoughts went something like:
Because I am on WLAN and want to talk to a different interface which is LAN (see pic for my infaces config) so if I allow traffic on the ports for SMB from WLAN to LAN they could see each others in MS Discovery.Okay, I've changed the domain to "local.domain" now, how can I set my resolver to register DHCP leases or static reservations I setup? Or should I just continue by using host overrides which works really well now?
Yes "untrue" is the hostname of my unraid server. ::)
-
The register dhcp and static are right there on the resolve main config page..
There have been some issues with dhcp renews and such causing a restart of unbound.. Have not looked into this in a while. Since I don't really can to resolve any sort of dynamic device.. Guest users to wifi, etc.
My devices pretty much all have a reservation so they always have the same IP… So use of that or host overrides will work just fine.
-
The register dhcp and static are right there on the resolve main config page..
There have been some issues with dhcp renews and such causing a restart of unbound.. Have not looked into this in a while. Since I don't really can to resolve any sort of dynamic device.. Guest users to wifi, etc.
My devices pretty much all have a reservation so they always have the same IP… So use of that or host overrides will work just fine.
Alla thanks to you sir! I'll set this thread to solved :D