Cannot access NAS via SMB

Windows Access Rights Management
asbath
Starting out
Posts: 13
Joined: Thu May 28, 2020 3:37 am

Cannot access NAS via SMB

Post by asbath »

Hello,

Yet another "I can't access my QNAP over SMB" thread. But I can access it from WebUI via browser, SSH from any terminal, and also can see it in QFinder. I can also access the selected folders via DLNA (Multimedia Console + Media Streaming Add-On). The funny thing is that only two of the client machines on the network can access the network shares, no other devices can.

Some background - I had a TS-451A that died from the LPC bug. The resistor trick helped revive it long enough for me to confirm data was intact, and then shut it down while I shopped for a new NAS. Enter TS-451D2. I dropped my drives into the new 451D2, and updated the firmware the to the latest (May 2021). Things were fine for a while. Suddenly, access to the NAS was lost on all but a couple devices on the network; this has lasted a couple of weeks now.

Here is a rough layout of the devices on the network. Everything is behind a single router; some devices are wireless, some are plugged in via GigE.

Code: Select all

modem
|--Router
|----QNAP NAS
|----media server (eth)
|----desktop (eth)
|----laptop (wifi/eth)
|----work laptop (eth)
|----macbook (wifi)
|----raspberry pi (eth)
|----phone (wifi)
|----tablet (wifi)
Basically the following devices can still access the NAS:
  • media server
    phone
For the media server, some network shares are mapped as \\NAS\{folder name}, others are accessible by navigating to \\NAS and opening up individual directories. For the phone (Android) I'm using the app "Solid Explorer" and the SMB client to access the network shares. Neither of these 2 devices have any issues navigating up and down the network shares; full read for everything, and write ability for the shares that allow it.

None of the other devices can access the shared directories. However, ALL devices can see the NAS on the network; Network in Windows 10 shows the NAS, but trying to open it returns the errors:
\\NAS

A device attached to the system is not functioning
OR
Windows cannot access \\NAS

Check the spelling of the name...
OR
\\NAS\{share} is not accessible. You might not have permission to use this network resource...

A device attached to the system is not functioning.
As mentioned above, all devices can access the NAS via the WebUI by going to 192.168.x.x:{port}; all devices can ping the NAS; all devices (excluding phone and tablet) can see the NAS in QFinder and also access almost all options by right-click -> {option}, only the "Network Drives" option fails; all devices can SSH into the NAS using a terminal/putty interface. For Windows, I've also confirmed that those devices have "SMB 1.0" enabled in the Add/REmove Windows features panel. For both Windows and macOS I've made sure to clear out the existing/saved credentials used to access the network shares (Keychain for macOS, Credential Manager for Windows)

Just to see if the NAS is even seeing these "blocked" devices from accessing it, I used the QuFirewall app to capture events while I tried to hit the NAS. The PCAP file (viewed in Wireshark) is completely empty, after getting at least 3 blocked devices to try and reach the NAS.

What can I do to try and fix this issue? It just happened one day. It happened a day or two after I updated to the latest June 2021 firmware update. I don't think it's the June firmware though, because the problem happened after I updated the firmware, and I've also re-installed the firmware to make sure it wasn't an accidental corruption/failure during that update.

Some info about the NAS hardware itself:

Code: Select all

Model: TS-451D2-4G
Version: 4.5.3.1697
RAM: 8GB (4+4)
Drives:
  2x8TB in RAID1
  2x4TB in RAID1
  1x USB 3.0 external drive 500GB

Settings
=====
myQNAPCloud service is DISABLED (I've never enabled it, ever)
QuFirewall service is ENABLED
-- using "Include subnets only" option for 192.168.1.0/24

(under Control Panel > Network > Win/Mac/NFS > Microsoft > Advanced > SMB versions)
Running SMB 3 max, SMB 1 min 
Enable WS-Discovery (checked)

(under Control Panel > Network > Service Discovery)
Enable UPnP Discovery Services (DISABLED)
I'm considering doing that 10-second reset, to try and restore the firmware defaults, and start anew. But I'd prefer not to if at all possible because it's a lot of configuration to set everything up again...
Last edited by asbath on Fri Jul 09, 2021 4:30 am, edited 1 time in total.
AndyKIUNAP2021
New here
Posts: 3
Joined: Fri Jun 25, 2021 6:21 am

Re: Cannot access NAS via SMB

Post by AndyKIUNAP2021 »

I apologise for hijacking the thread, would you able to post a link to a guide to that LPC Bug hack? my TS 251 2 Bay seems to have hit as well and I am planning to buy the 451D2 like you. But all the data is not accessible and just want to play around to get my data back.

Thanks and apologies again.
torch1
Know my way around
Posts: 137
Joined: Thu Jul 04, 2019 4:53 am

Re: Cannot access NAS via SMB

Post by torch1 »

Suggest you install Wireshark https://www.wireshark.org/ on one of the devices that has issues and look at the smb negotiation.
asbath
Starting out
Posts: 13
Joined: Thu May 28, 2020 3:37 am

Re: Cannot access NAS via SMB

Post by asbath »

torch1 wrote: Fri Jun 25, 2021 9:24 am Suggest you install Wireshark https://www.wireshark.org/ on one of the devices that has issues and look at the smb negotiation.
I haven't tried this yet, but a suggestion from someone else, elsewhere, gave me the idea to try AFP on my Macbook Pro, and that worked wonderfully. So obviously the NAS is accessible, just that the SMB settings are somehow borked. Why, I do not know.

I'll try Wireshark later this week when I have a moment, see if it can help troubleshoot. Otherwise, I have some days off later, and I'll be doing the 10-second reset to just start fresh with QTS.
AndyKIUNAP2021 wrote: Fri Jun 25, 2021 8:43 am I apologise for hijacking the thread, would you able to post a link to a guide to that LPC Bug hack? my TS 251 2 Bay seems to have hit as well and I am planning to buy the 451D2 like you. But all the data is not accessible and just want to play around to get my data back.

Thanks and apologies again.
viewtopic.php?t=157459

You'll need an oscilloscope or a multimeter to check the voltage on the pins. In my case the voltage was > 2.2V, so I soldered a 100 ohm resistor to pin 1 and ground. It revived a "dead" TS-451A long enough for me to essentially double-check that everything was still on the drives, and safely shut it down.
torch1
Know my way around
Posts: 137
Joined: Thu Jul 04, 2019 4:53 am

Re: Cannot access NAS via SMB

Post by torch1 »

Basic questions:
  • do you have valid Domain for your LAN (such as .lan or .home - NOT .local)?
    do all of your devices get their IP from the router through DHCP?
    do all of your devices show the router IP as the DNS server?
On the QNAP, my settings are:
  • MS networking - enable file services for MS & Standalone server
    Advanced settings - enable Asynchronous I/O, Highest SMB3/Lowest SMB2
    Apple networking - disable AFP
    Service Discovery (Bonjour) - Enable Samba
asbath
Starting out
Posts: 13
Joined: Thu May 28, 2020 3:37 am

Re: Cannot access NAS via SMB

Post by asbath »

do you have valid Domain for your LAN (such as .lan or .home - NOT .local)?
Nope, no domain setup. I keep my network relatively simple to avoid issues like these.
do all of your devices get their IP from the router through DHCP?
Yes, the router is the DHCP server. Everything gets its IP from the router, even the devices with static IP addresses (like the NAS)
do all of your devices show the router IP as the DNS server?
I have 2 DNS servers: a Raspberry Pi and the "router". RPi is the primary, and the "router" is the alternative which points to AdGuard DNS. So in this case everything gets DNS from the router, and the router points to the RPi and AdGuard service.
On the QNAP, my settings are:
MS networking - enable file services for MS & Standalone server
Advanced settings - enable Asynchronous I/O, Highest SMB3/Lowest SMB2
Apple networking - disable AFP
Service Discovery (Bonjour) - Enable Samba
I also have all of these same settings, except I have enabled Apple Networking (as noted above, AFP works just fine).
asbath
Starting out
Posts: 13
Joined: Thu May 28, 2020 3:37 am

Re: Cannot access NAS via SMB

Post by asbath »

torch1 wrote: Fri Jun 25, 2021 9:24 am Suggest you install Wireshark https://www.wireshark.org/ on one of the devices that has issues and look at the smb negotiation.
OK, so I installed Wireshark on a problematic client machine, and attempted to access the NAS a few times. One of the responses returns the Info

Code: Select all

NegotiateProtocol Response, Error: STATUS_UNSUCCESSFUL
Also, it says it's using SMB2. I wonder if it's possible to force SMB3?

Is there something specific I should be looking for in Wireshark? I'm not quite sure what red flags to look for here.
Lurick
New here
Posts: 4
Joined: Sun Jun 25, 2017 8:53 pm

Re: Cannot access NAS via SMB

Post by Lurick »

I'm in a similar boat myself. SMB access does not work but NFS kind of works (I still have to figure out all the various permissions) as a workaround and I can at least see the shares. I can still access SMB folders from computers that previously had them mapped BUT I cannot map them in any manner (CLI or GUI) in any new computer with Windows.
asbath
Starting out
Posts: 13
Joined: Thu May 28, 2020 3:37 am

Re: Cannot access NAS via SMB

Post by asbath »

Lucky! I can't even get NFS to work. The error I get with NFS is "Network Error - 53... "The network path was not found." Again, it sounds like the clients just can't see the NAS, even though I can SSH and access via web ui.

I will say that I have never had any issues prior to installing QuFirewall, and so I'm wondering if there are any weird configuration issues caused by QuFirewall.

I've tried disabling QuFirewall to see if that helps any, but it doesn't appear to have done anything. I've also added rules to the Firewall profile, but same thing - no luck.

I have an open ticket with QNAP support, but they are extremely slow to respond. It's surprisingly slow.
Lurick
New here
Posts: 4
Joined: Sun Jun 25, 2017 8:53 pm

Re: Cannot access NAS via SMB

Post by Lurick »

asbath wrote: Sat Jul 03, 2021 2:28 pm Lucky! I can't even get NFS to work. The error I get with NFS is "Network Error - 53... "The network path was not found." Again, it sounds like the clients just can't see the NAS, even though I can SSH and access via web ui.

I will say that I have never had any issues prior to installing QuFirewall, and so I'm wondering if there are any weird configuration issues caused by QuFirewall.

I've tried disabling QuFirewall to see if that helps any, but it doesn't appear to have done anything. I've also added rules to the Firewall profile, but same thing - no luck.

I have an open ticket with QNAP support, but they are extremely slow to respond. It's surprisingly slow.
What's double perplexing for me is that I have a second older NAS that I use as a satellite kind of deal for just a few things, it's also on 4.5.4 code, and it doesn't have these issues!! The one having the issues is much newer (model/make wise) but the fact that one works and one doesn't is really confusing me! I'm in the same boat as you though, I can access everything else via GUI/SSH/etc.
asbath
Starting out
Posts: 13
Joined: Thu May 28, 2020 3:37 am

Re: Cannot access NAS via SMB

Post by asbath »

Lurick wrote: Sat Jul 03, 2021 7:08 pm
asbath wrote: Sat Jul 03, 2021 2:28 pm Lucky! I can't even get NFS to work. The error I get with NFS is "Network Error - 53... "The network path was not found." Again, it sounds like the clients just can't see the NAS, even though I can SSH and access via web ui.

I will say that I have never had any issues prior to installing QuFirewall, and so I'm wondering if there are any weird configuration issues caused by QuFirewall.

I've tried disabling QuFirewall to see if that helps any, but it doesn't appear to have done anything. I've also added rules to the Firewall profile, but same thing - no luck.

I have an open ticket with QNAP support, but they are extremely slow to respond. It's surprisingly slow.
What's double perplexing for me is that I have a second older NAS that I use as a satellite kind of deal for just a few things, it's also on 4.5.4 code, and it doesn't have these issues!! The one having the issues is much newer (model/make wise) but the fact that one works and one doesn't is really confusing me! I'm in the same boat as you though, I can access everything else via GUI/SSH/etc.
So you basically described the same kind of situation I am in, with regards to having a second older NAS that never has these problems. What is your secondary NAS model? I came from a TS-451A, which technically is back from the dead, that was also running on 4.5.4. Technically I also borrowed a TS-231P1 to check on the drives and make sure the data was intact, before fully migrating to the TS-451D2. This is a newer model compared to the TS-451A, but still running 4.5.2 at that time (the latest firmware I had updated to). I didn't get 4.5.3 or 4.5.4 until I had fully migrated to the TS-451D2.

I'm wondering if the SMB issue is purely within QTS, or if it's kind of like a firmware+hardware driver issue? The firmware updates somehow don't play well with the drivers?
torch1
Know my way around
Posts: 137
Joined: Thu Jul 04, 2019 4:53 am

Re: Cannot access NAS via SMB

Post by torch1 »

asbath wrote: Thu Jul 01, 2021 5:12 am OK, so I installed Wireshark on a problematic client machine, and attempted to access the NAS a few times. One of the responses returns the Info

Code: Select all

NegotiateProtocol Response, Error: STATUS_UNSUCCESSFUL
Also, it says it's using SMB2. I wonder if it's possible to force SMB3?

Is there something specific I should be looking for in Wireshark? I'm not quite sure what red flags to look for here.
SMB2 is the protocol - SMB3 is actually a set of "dialects" within that protocol. In Wireshark, filter on smb2, then look at the first Negotiate Protocol Request from your laptop/pc. In the middle section of the WS display, open SMB2 > Negotiate Protocol Request > where you see a list of Dialects:
Dialect: SMB 2.0.2 (0x0202)
Dialect: SMB 2.1 (0x0210)
Dialect: SMB 3.0 (0x0300)
Dialect: SMB 3.02 (0x0302)
Those are the dialects that your Laptop/pc speaks. Now look for the response from your NAS - you have to have at least one common one to be able to communicate.
asbath
Starting out
Posts: 13
Joined: Thu May 28, 2020 3:37 am

Re: Cannot access NAS via SMB

Post by asbath »

torch1 wrote: Sun Jul 04, 2021 1:08 am
asbath wrote: Thu Jul 01, 2021 5:12 am OK, so I installed Wireshark on a problematic client machine, and attempted to access the NAS a few times. One of the responses returns the Info

Code: Select all

NegotiateProtocol Response, Error: STATUS_UNSUCCESSFUL
Also, it says it's using SMB2. I wonder if it's possible to force SMB3?

Is there something specific I should be looking for in Wireshark? I'm not quite sure what red flags to look for here.
SMB2 is the protocol - SMB3 is actually a set of "dialects" within that protocol. In Wireshark, filter on smb2, then look at the first Negotiate Protocol Request from your laptop/pc. In the middle section of the WS display, open SMB2 > Negotiate Protocol Request > where you see a list of Dialects:
Dialect: SMB 2.0.2 (0x0202)
Dialect: SMB 2.1 (0x0210)
Dialect: SMB 3.0 (0x0300)
Dialect: SMB 3.02 (0x0302)
Those are the dialects that your Laptop/pc speaks. Now look for the response from your NAS - you have to have at least one common one to be able to communicate.
Interesting note about the "dialects" - something I never knew before, but I know now what that is (thanks to some Googling, upon your mention).

In Wireshark, I see the following dialects for a Negotiate Protocol Request:
SMB 2.0.2 (0x0202)
SMB 2.1 (0x0210)
SMB 3.0 (0x0300)
SMB 3.02 (0x0302)
SMB 3.1.1 (0x0311)

And I get 2 responses:
The first response is always "NegotiateProtocol Response" with Dialect: 0x02ff,
the second is always "NegotiateProtocol Response, ERROR: STATUS_UNSUCCESSFUL" and there is no dialect in this second response at all
torch1
Know my way around
Posts: 137
Joined: Thu Jul 04, 2019 4:53 am

Re: Cannot access NAS via SMB

Post by torch1 »

As far as I know, 0x02ff is not a legitimate SMB dialect...https://docs.microsoft.com/en-us/opensp ... 3944f52fc5 - scroll down to Dialects at the bottom.
Is this Dialect response from the IP of your QNAP NAS? I don't know what this could be, but if your NAS does not return a dialect that is in the Request from your client, they cannot communicate.
I would check the MS Networking settings on your NAS.
I also recommend giving your LAN a domain name. When you use just a hostname without the .domain portion ("\\NAS\" instead of "\\NAS.lan\"), I don't know if your Windows pc correctly queries your router for the IP of the NAS on your LAN. Windows does not use Bonjour, so I don't know if their service discovery finds the QNAP smb service. (i.e. for the _smb._tcp service) You should check this with Wireshark when you first connect to your LAN and try to connect to the QNAP NAS using just \\NAS\.
Lurick
New here
Posts: 4
Joined: Sun Jun 25, 2017 8:53 pm

Re: Cannot access NAS via SMB

Post by Lurick »

I think I finally figured it out and hope this might help others.
There are two smb.conf files in QNAP:
/etc/smb.conf
/mnt/HDA_ROOT/.config/smb.conf

These got out of sync somehow and once I figured that part out I copied from:
/mnt/HDA_ROOT/.config/smb.conf
TO
/etc/smb.conf
and restarted smb and everything works!

Commands:
cp /etc/smb.conf /etc/smb.conf.busted
cp /mnt/HDA_ROOT/.config/smb.conf /etc/smb.conf
/etc/init.d/smb.sh restart
Post Reply

Return to “Windows”