windows防护之(一)屏蔽危险端口

CMD命令行执行即可

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=拒绝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
微信打赏微信打赏

如果文章对你有帮助,欢迎点击上方按钮打赏作者

最后编辑于:2022/11/24作者: 辣条①号

现在在做什么? 接下来打算做什么? 你的目标什么? 期限还有多少? 进度如何? 不负遇见,不谈亏欠!

暂无评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

arrow grin ! ? cool roll eek evil razz mrgreen smile oops lol mad twisted wink idea cry shock neutral sad ???