CAUTION: If SMB Barring is disabled globally, the entire HNAS can get blocked by the DCs if there are too many incorrect login attempts from a single user. This new feature allows the HNAS to block incorrect NTLM requests and not pass them on to the DC(s) for authentication if there are too many failed login attempts and allows all other SMB clients to continue access to the HNAS if they have valid login credentials.
smb-auto-barring allows the HNAS to automatically continue accepting client NTLM requests with valid credentials and any client with repeated invalid credentials gets blocked by the HNAS and the HNAS won't pass on the credentials to the DC(s).Managing the barred clients' list is done using the following commands; check the man pages for more details on each command.
smb-barred-client-add : to add a client to the SMB barred client listsmb-barred-client-remove : to remove a client from the SMB barred client listsmb-barred-clients-list : to display the SMB barred clients listsmb-barred-clients-clear: to clear the SMB barred client list Clients are barred based on their IP address, so each IPv4 and IPv6 (if configured) address will need to be considered a separate entry. Once a client is barred, that client can't connect over SMB regardless of the credentials used, then manual removal from the 'barred' list is required. A maximum of 512 client IP addresses per security context can be barred.
The output from the smb-barred-clients-list is included in the showall.txt log file in the HNAS diags.
TIP: A workaround (where SMB Barring does not apply) is for a client to use Kerberos. It will communicate directly to the DC(s) for authentication, not through the HNAS.
Use the following commands to view the current setting values
for-each-evs set-smb-auto-barring-mean-interval-threshold-in-seconds
for-each-evs set-smb-auto-barring-sample-size
EXAMPLE:
4080:$ for-each-evs set-smb-auto-barring-mean-interval-threshold-in-seconds
EVS 1 (4080-EVS01):
smb-auto-barring-mean-interval-threshold-in-seconds = '0x2'(2)
EVS 2 (4080-EVS02):
smb-auto-barring-mean-interval-threshold-in-seconds = '0x2'(2)
EVS 3 (4080-EVS03):
smb-auto-barring-mean-interval-threshold-in-seconds = '0x2'(2)
EVS 4 (4080-EVS04):
smb-auto-barring-mean-interval-threshold-in-seconds = '0x2'(2)
4080:$ for-each-evs set-smb-auto-barring-sample-size
EVS 1 (4080-EVS01):
smb-auto-barring-sample-size = '0x15'(21)
EVS 2 (4080-EVS02):
smb-auto-barring-sample-size = '0x15'(21)
EVS 3 (4080-EVS03):
smb-auto-barring-sample-size = '0x15'(21)
EVS 4 (4080-EVS04):
NOTE: Before disabling auto-barring, the customer may choose to tune the command parameters.
• set-smb-auto-barring-mean-interval-threshold-in-seconds: This command sets the SMB client auto-barring mean interval threshold - a given client attempting connections with an incorrect password more frequently than this will be barred. Default value is 2 (seconds). Configurable range 1 to 120 seconds in 1 second intervals
• set-smb-auto-barring-sample-size: This command sets the SMB client auto- barring sample size - i.e., the number of instances a client can fail to connect with an incorrect password before being evaluated against the above interval for banning. Default value is 21. Configurable range is 21 to 512
At the default values, if a client IP address attempts to connect with an incorrect password 21 times it will then be considered a candidate for auto-barring. If the mean rate that it is attempting to login in is faster than once per 2 second interval it will be added to the barred clients list:
set-smb-auto-barring-sample-size allows you to change how many bad connection attempts can be made before a client is considered for auto-barring.
EXAMPLE: Command below would allow 42 connection attempts before the client was considered for auto-barring.
$ set-smb-auto-barring-sample-size 42 set-smb-auto-barring-mean-interval-threshold-in-seconds allows you to change the frequency at which a client can attempt to connect before being barred.
EXAMPLE: Command below would not add a client to the barred list unless it was attempting to connect more frequently than once every 4 seconds (on average).
$ set-smb-auto-barring-mean-interval-threshold-in-seconds 4
The default values were carefully selected to avoid clients being auto-barred unnecessarily. If you choose to vary them, it is suggested starting with small adjustments and observing the results. Setting too large a threshold or sample size can reduce the auto-barring feature's effectiveness.
This procedure allows disabling SMB auto-barring on the Hitachi NAS platforms.
CAUTION:
NOTE:
If Multi-Tenancy is disabled,(regardless of the Security Context of the EVS), use the Global SMB Barring setting to disable SMB Barring.
If Multi-Tenancy is enabled, use SMB Barring at the Individual EVS Security Context (again, this only works IF Multi-Tenancy is enabled).
From the CLI Use the following procedure to enable SMB Barring on an Individual EVS Context if Multi-Tenancy is enabled.
manager; provide the current password.evs-security list
NOTE: Note: The system may or may not have EVS(s) designated in a particular security context.
<evs-security list for admin vnode>
EVS id Per EVS security status
------ ------'----------'-----
1 global
2 global
3 global
4 global
5 global
6 global
8 global
10 ' global
11 global
12 global
13 individual <---Global disable will not turn off this 'individual' EVS Security Context
15 global
$ set smb-auto-barring false
NOTE: If an EVS in an Individual Context. $ vn <EVS ID>
$ set-for-evs smb-auto-barring -a true
NOTE: If an EVS in an Individual Context. $ vn <EVS ID>
$ set-for-evs smb-auto-barring -a false
In a Citrix environment and Multi-Tenancy is Enabled, instead of disabling auto-barring for the entire environment, the EVS(s) serving the Citrix Servers could be placed into Individual Security Groups and then use the above command to disable auto-barring only the EVS(s) that is serving data to the Citrix Servers.
The process would be, from a high level:
vn <EVS ID>set-for-evs smb-auto-barring -a falseThe two sections below, one manual and one automated, help to identify which client IP address is repeatedly using the wrong login credentials, thus invoking the "smb-auto-barring" feature OR in the case where smb-auto-barring is disabled may cause the EVS to be denied access to the DC.
This client/user, if not barred, can cause a performance impact on the HNAS and a denial of access to the DC(s). This behavior can impact all users on a particular node, not just the client using an incorrect password or user name. It takes many failed attempts before the NAS gets temporarily barred from the DC(s), and that exact number is unknown.
manager<enter the current manager password>Available servers:
==================
1) 10.0.2.210 HNASDEMO
Please choose a server, or type 'q' to exit to a bash Shell.
<type the number>nolog for-each-evs smb-barred-clients-list: Displays the list of client addresses barred from SMB access.nolog pn all dblog | grep "<IP Address": Check the dblog for the IP(s) found in step 1 that are of interest.nolog pn all logtrace dump paced-event-logger | grep "<IP Address": The paced-event-logger gives the recent output of events that spam the dblog.nolog pn all dblog | grep "10.123.xx.xx" | grep "failed to logon": Check for failed logons.nolog pn all logtrace dump paced-event-logger | grep "10.123.xx.xx" | grep “failed to logon”There are several words and phrases to key on when grepping the dblog and paced-event-logger here are a few more common ones:
NT_STATUS_WRONG_PASSWORDNT_STATUS_ACCOUNT_LOCKED_OUTNT_STATUS_NO_SUCH_USERNT_STATUS_PASSWORD_EXPIREDNT_STATUS_ACCESS_DENIED$failed_login=@('NT_STATUS_WRONG_PASSWORD','NT_STATUS_PASSWORD_EXPIRED','NT_STATUS_ACCOUNT_LOCKED_OUT','NT_STATUS_NO_SUCH_USER')
try{$failed_login.foreach({"Checking files for $_"})
Get-Content *current_dblog* | Out-String -Stream | Select-String -Pattern $failed_login -SimpleMatch
}catch{$_.Exception.Message
}finally {"End of program"}
EXAMPLE: crontab add "00 08 * * *" "pn all diagemail <customer email address>" Tags: hnas,SMB,Domain Controller,automatic,Citrix,NTLM,auto-barring,smb-auto-barring,Barred,SMB client,Banned,Blacklist,DC
PageID: 156251