这里以445端口为例。具体操作如下:
1、打开控制面板并找到windows防火墙。控制面板在“开始”菜单中。
2、需要启用Windows防火墙才能启用防火墙高级设置。
3、设置入站规则。
4、选择“新建规则”。
5、选择端口并单击next。
6、特定的本地端口。
7、选中应用规则的所有选项。这将关闭445端口。
interface Ethernet 1/0/1
shutdown
acl number 3001
rule 5 deny tcp source-port eq 445 destination-port eq 445
rule 10 deny udp source-port eq 445 destination-port eq 445
quit
interface GigabitEthernet0/0/1
traffic-filter inbound acl 3001
traffic-filter outbound acl 3001