命令行添加防火墙

添加windows

netsh advfirewall firewall add rule name=BHC禁用TCP端口入站 description=禁止TCP端口进行入站 dir=in action=block protocol=TCP localport=21,23,17,138,139

删除dom

netsh advfirewall firewall Delete rule name=BHC禁用TCP端口入站

开启防火墙spa

netsh advfirewall set privateprofile state on
netsh advfirewall set publicprofile state off
set allprofiles - 在全部配置文件中设置属性。
set currentprofile - 在活动配置文件中设置属性。
set domainprofile - 在域配置文件中设置属性。
set global     - 设置全局属性。
set privateprofile - 在专用配置文件中设置属性。
set publicprofile - 在公用配置文件中设置属性。

 打开windows防火墙设置界面code

 firewall.cplblog

相关文章
相关标签/搜索