More information on SMBv1, NETBIOS, Win10, no shares, etc.

Status
Not open for further replies.

R.G.

Explorer
Joined
Sep 11, 2011
Messages
96
I found yet more info on why my network sharing went to ... er, heck when I followed the desperate warnings about SMBv1 being an open door for ransomware. I suspect that this confusing (to me, a networking user, not a cognoscenti) pile of overlapping and interacting issues is behind quite a few of the posts here and many places over the net.

A lot of it has to do with the fact that you have to go learn the innards of networking to understand how to play the game. Some history, too. I studied quite a few treatises on networking in general, FreeNAS and FreeBSD, NETBIOS, SAMBA, Windows vs Unix permissions, routers. Understanding didn't begin until I read this:
http://janbacon.blogspot.com/2015/04/disable-netbios-enable-dns-with-dd-wrt.html
It turns out that SAMBA shares can be based on NETBIOS or TCP. SMBv1 runs on NETBIOS only (if I read the stuff correctly) as does the network browsing function of Windows. Turning off SMBv1 disables network discovery of shares by NETBIOS. This ought to leave SMBv2 and up running just fine, discovering network shares by other means. In fact, if I understand it right, both NETBIOS discovery and the WSD and SSDP discoveries run a race and the first to report back a share is used to access that share. In my case, even with WSD and SSDP running and discovering all the other shares, my FreeNAS server is always discovered by NETBIOS.

I spent probably more than four hours trying to disable NETBIOS responses from FreeNAS before concluding that it was not possible or too hidden. I also looked for some way to make the >minimum< level of SMB be SMBv2. Never found it.

The other means is TCP over port 445. Turns out that TCP over ports 13x and 445 is commonly blocked on routers, including mine, because of the historical vulnerabilities that have happened with v1 and the 13x ports. SMBv2 and up require TCP over 445 to do network discovery, so it does not work unless you open port 445.

Opening TCP port 445 in my client firewall duly re-enabled discovery of my freenas server and the shares inside it, even with SMBv1 disabled, which had been impossible before.

I still get the bad-credentials loop and can't actually access the shares yet, but I can reliably see them on my local net. More work to do to discover the next problem.

This conundrum seems to be the result of at least three different and overlapping issues. Microsoft, however good- or ill-intentioned you think them, advised removing SMBv1 because of the huge vulnerabilities it opens. However, with 30 years of SMBv1 always being there, it's become part of the mental ecosystem, so very many applications and devices use it. Routers can and often are set up to block TCP over 13x and 445 because of the vulnerabilities. Firewalls are often (like the one in my client) set up to block them for the same reason.

I think the myriad of issues with SMBv1, Windows, and FreeNAS CIFS shares is, at its root, an overlapping of good-intentioned restrictions and that whomever-replies-first share discovery stuff in Windows. It makes getting this all to work without SMBv1 be like the only way to get to the final level is to hold the gold key in your left hand, spinning right three times, and saying "hello" to the doorman.

Well, OK, maybe just knowing more about networking than I do.

I still get password fails, access denied, wrong username or password, etc. replies when I actually try to access the share, but it's because I have not stumbled on the correct green-apple-twostep dance of permissions to get there yet. Or another layer of access restrictions.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
I also looked for some way to make the >minimum< level of SMB be SMBv2. Never found it.
???

Services->SMB->Settings->Minimum Protocol Version->SMB2
?????
 

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630

R.G.

Explorer
Joined
Sep 11, 2011
Messages
96
Thanks to both of you. I was confused by the lack of a minimum or maximum SMB level in 11, which I went to in my pursuing getting shares back on line to my FreeNAS server. I have ensured that "NTLMv1 auth" was unchecked (it was) on my 11U5.

This adds one more level to the dance-steps needed - understand what options are available to you to limit access types on FreeNAS.

Now I'm digging into why I get some variant of bad username and ID when trying to actually access the share. I have tried all variants and spellings of valid name/password and I still get a continuous stream of popups saying the username and/or password is invalid. I cannot tell yet whether the Windows box or the FreeNas box is giving the access failure. I'm biased toward FreeNAS returning the "no access", but the same credentials give me access by SSH into a console session. That says to me "It's not the credentials, it's what's checking them."
 

Brighter

Dabbler
Joined
Nov 8, 2013
Messages
22
Thanks to both of you. I was confused by the lack of a minimum or maximum SMB level in 11, which I went to in my pursuing getting shares back on line to my FreeNAS server. I have ensured that "NTLMv1 auth" was unchecked (it was) on my 11U5.

This adds one more level to the dance-steps needed - understand what options are available to you to limit access types on FreeNAS.

Now I'm digging into why I get some variant of bad username and ID when trying to actually access the share. I have tried all variants and spellings of valid name/password and I still get a continuous stream of popups saying the username and/or password is invalid. I cannot tell yet whether the Windows box or the FreeNas box is giving the access failure. I'm biased toward FreeNAS returning the "no access", but the same credentials give me access by SSH into a console session. That says to me "It's not the credentials, it's what's checking them."
Did you manage to solve this?
 

R.G.

Explorer
Joined
Sep 11, 2011
Messages
96
After a fashion.

Near as I can tell, Windows 7, 8, and 10 have thoroughly hosed up network access with trying to remove SMB1. It's just no going to work correctly until Windows gets updated enough. Back when I was working on operating systems we called this a full-customer-base beta test.

What got me back to operating was to put the NAS box in the hosts file of every machine that has to access it. That seems to have circumvented the odd permissions and recognition issues that SMB1 juggling by Windows introduced. This trick let me actually get back into the NAS with SMB1 still active, which had proved to be impossible with the permissions debacle.

My machines still detect the NAS only by NETBIOS, but at least I can get backups done.

That noise you hear is me grinding my teeth.
 

Brighter

Dabbler
Joined
Nov 8, 2013
Messages
22
After a fashion.

Near as I can tell, Windows 7, 8, and 10 have thoroughly hosed up network access with trying to remove SMB1. It's just no going to work correctly until Windows gets updated enough. Back when I was working on operating systems we called this a full-customer-base beta test.

What got me back to operating was to put the NAS box in the hosts file of every machine that has to access it. That seems to have circumvented the odd permissions and recognition issues that SMB1 juggling by Windows introduced. This trick let me actually get back into the NAS with SMB1 still active, which had proved to be impossible with the permissions debacle.

My machines still detect the NAS only by NETBIOS, but at least I can get backups done.

That noise you hear is me grinding my teeth.
Thanks - let me try editing my HOSTS file.

On a side note, do you know what version of SMB Windows is using to connect to FreeNAS?

Does Get-SmbConnection from powershell show you connecting via SMBv1?
 

Brighter

Dabbler
Joined
Nov 8, 2013
Messages
22
I've managed to get back in (turns about to be some strange unexplained behaviour with that specific user account), editing the HOSTS files didn't seem to have influenced anything, one way or the other.

I'm actually connected from Win10 to FreeNAS via SMB 3.1.1 though, fwiw.
 
Status
Not open for further replies.
Top