echo 开启防火墙
netsh firewall set opmode enable


echo 关闭445端口
netsh advfirewall firewall add rule name="deny445" dir=in protocol=tcp localport=445 action=block

netsh advfirewall firewall add rule name="deny445" dir=in protocol=udp localport=445 action=block


echo 关闭135端口
netsh advfirewall firewall add rule name="deny135" dir=in protocol=tcp localport=135 action=block

netsh advfirewall firewall add rule name="deny135" dir=in protocol=udp localport=135 action=block


echo 关闭137端口
netsh advfirewall firewall add rule name="deny137" dir=in protocol=tcp localport=137 action=block

netsh advfirewall firewall add rule name="deny137" dir=in protocol=udp localport=137 action=block


echo 关闭138端口
netsh advfirewall firewall add rule name="deny138" dir=in protocol=tcp localport=138 action=block

netsh advfirewall firewall add rule name="deny138" dir=in protocol=udp localport=138 action=block


echo 关闭139端口
netsh advfirewall firewall add rule name="deny139" dir=in protocol=tcp localport=139 action=block
netsh advfirewall firewall add rule name="deny139" dir=in protocol=udp localport=139 action=block