Got it

Block SMB port

Created: May 29, 2021 08:40:07Latest reply: Jun 27, 2021 10:27:02 308 2 0 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hi,

We need to block SMB port 445 to prevent unauthorized connection through it. Can you tell me how to configure it?

Here is our firewall model.

<huawei> display version

Huawei Versatile Routing Platform Software                                      

VRP (R) Software, Version 5.160 (USG6300 V500R005C20)                     

Copyright (C) 2014-2018 Huawei Technologies Co., Ltd                            

USG6370 uptime is 0 week, 1 day, 2 hours, 5 minutes   


Featured Answers

Recommended answer

Popeye_Wang
Admin Created May 29, 2021 08:46:54

Hello,

Kindly run the following command to block port 445 SMB for both inbound and outbound traffic of the firewall

[FW] IP service-set smb_port type object

[FW-object-service-set-smb_port] service protocol TCP source-port 445 destination-port 0 to 65535

[FW-object-service-set-smb_port] service protocol TCP source-port 0 to 65535 destination-port 445

[FW-object-service-set-smb_port] quit

[FW] security-policy

[FW-policy-security] rule name smb_port_deny

[FW-policy-security-rule-smb_port_deny] source-zone trust untrust

[FW-policy-security-rule-smb_port_deny] destination-zone untrust trust

[FW-policy-security-rule-smb_port_deny] service smb_port

[FW-policy-security-rule-smb_port_deny] action deny

[FW-policy-security-rule-smb_port_deny] quit

[FW-policy-security] rule move smb_port_deny top

Reference CLI: Example for Configuring Security Policies Based on IP Addresses and Ports

After applying this configuration, please continue monitoring to see if the configuration takes effect

View more
  • x
  • convention:

All Answers

Hello,

Kindly run the following command to block port 445 SMB for both inbound and outbound traffic of the firewall

[FW] IP service-set smb_port type object

[FW-object-service-set-smb_port] service protocol TCP source-port 445 destination-port 0 to 65535

[FW-object-service-set-smb_port] service protocol TCP source-port 0 to 65535 destination-port 445

[FW-object-service-set-smb_port] quit

[FW] security-policy

[FW-policy-security] rule name smb_port_deny

[FW-policy-security-rule-smb_port_deny] source-zone trust untrust

[FW-policy-security-rule-smb_port_deny] destination-zone untrust trust

[FW-policy-security-rule-smb_port_deny] service smb_port

[FW-policy-security-rule-smb_port_deny] action deny

[FW-policy-security-rule-smb_port_deny] quit

[FW-policy-security] rule move smb_port_deny top

Reference CLI: Example for Configuring Security Policies Based on IP Addresses and Ports

After applying this configuration, please continue monitoring to see if the configuration takes effect

View more
  • x
  • convention:

Very interesting, noted
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.