windows防火墙一键禁用135,137,138,139,445端口脚本

windows防火墙一键禁用135,137,138,139,445端口脚本
Photo by Viktor Forgacs / Unsplash
20210106000451.png


保存以下脚本,命名为xxx.bat 管理员模式运行即可

@echo off
netsh advfirewall firewall add rule name=BlockPort_135_137_138_139_445 dir=in action=block protocol=tcp localport=135,137,138,139,445
pause

netsh advfirewall firewall add rule name=BlockPort_135_137_138_139_445 dir=in action=block protocol=udp localport=135,137,138,139,445
pause
exit

一键禁用445端口脚本下载地址:
https://img-1251343945.file.myqcloud.com/usr/uploads/2021/01/禁用端口_135_137_138_139_445.bat