The problem: You cannot access the SAMBA (SMB) shares on your QNAP NAS from the Windows File Explorer and after you tried, access to the web interface also stopped working. The NAS is still accessible from other PCs on the same network.
The reason: Windows will first try to connect to your NAS using your Windows login credentials. If this fails too many times and Network Access Protection on your NAS is enabled, your PC’s IP address will be banned:
You can see the failed login attempts in the System Connection Logs (if enabled for SAMBA):
There are many threads about this issue on the QNAP forum proposing various solutions, such as:
- Creating a user account on the NAS with the same user name and password as on Windows.
- Disabling Network Access Protection on the NAS.
- Making all folders public.
- Disabling all guest shares on the NAS to force Windows to show the network credentials dialog.
I tried a different solution which I found here. I left everything on the NAS unchanged. In the local group policy settings of my Windows PC, I enabled insecure guest logons for the SMB client. This allows the PC to connect to SAMBA shares which are not protected by a password (such as the Public folder on a QNAP NAS).
Note: The Group Policy Editor (gpedit.msc) is not available in all versions of Windows 10 and Windows 11. It is primarily included in the Professional, Enterprise, and Education editions of these operating systems.
To start the Local Group Policy Editor, press your Windows key and start typing “group policy” (then select “Edit group policy”):
Alternatively, you can also press the Windows key and R, then type “gpedit.msc” and click on OK:
In the Local Group Policy Editor, the setting can be found under Local Computer Policy -> Computer Configuration -> Administrative Templates ->Network -> Lanman Workstation -> Enable insecure guest logons:
Note: The description says that “if you do not configure this policy setting, the SMB client will allow insecure guest logons.” This was not true for me on Windows 11 21H2, the setting had to be explicitly enabled. On other PCs running Windows 10, the described behavior was correct and the entire problem never appeared.
Now (and after the IP ban period has expired, of course) it was possible to access the NAS through the file explorer. Clicking on a protected folder brought up the Enter network credentials dialog:
Why did this work? Apparently, Windows only tried to use the current user credentials once when connecting to the NAS and then used guest access. As this resulted only in a single failed access attempt, the PC’s IP address was not banned.
For further support, please visit the QNAP forum
Update February 15, 2023: A previous version of this article mentioned making changes to the registry, however the screenshot showed the Local Group Policy Editor (gpedit.msc) and not the registry editor (regedit.exe). Many thanks to Daniel for the comment.
Update March 28, 2023: Added a clarification that the Group Policy Editor (gpedit.msc) is only available on certain editions of Windows and changed the title accordingly.