netsh ipsec static ^
add policy name=关闭危险端口
netsh ipsec static ^
add filteraction name=阻止端口 action=block
netsh ipsec static ^
add filterlist name=危险端口关闭
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝TCP445端口 dstport=445 protocol=tcp mirrored=yes
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝UDP445端口 dstport=445 protocol=udp mirrored=yes
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝TCP135端口 dstport=135 protocol=tcp mirrored=yes
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝UDP135端口 dstport=135 protocol=udp mirrored=yes
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝TCP139端口 dstport=139 protocol=tcp mirrored=yes
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝TCP593端口 dstport=593 protocol=tcp mirrored=yes
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝TCP1025端口 dstport=1025 protocol=tcp mirrored=yes
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝TCP2531端口 dstport=2531 protocol=tcp mirrored=yes
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝TCP2745端口 dstport=2745 protocol=tcp mirrored=yes
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝TCP3127端口 dstport=3127 protocol=tcp mirrored=yes
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝TCP6129端口 dstport=6129 protocol=tcp mirrored=yes
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝UDP123端口 dstport=123 protocol=udp mirrored=yes
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝UDP137端口 dstport=137 protocol=udp mirrored=yes
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝UDP138端口 dstport=138 protocol=udp mirrored=yes
netsh ipsec static ^
add filter filterlist=危险端口关闭 srcaddr=any dstaddr=me description=拒绝UDP1900端口 dstport=1900 protocol=udp mirrored=yes
netsh ipsec static ^
add rule name=BlockAllAccess policy=关闭危险端口 filterlist=危险端口关闭 filteraction=阻止端口
netsh ipsec static set policy name=关闭危险端口 assign=y
exit