关闭登录在线客服系统
请输入手机号码,系统将关联您登记过的信息,
以便我们高效为您服务。
手机号码:
 
  立即咨询

Windows7 屏蔽高危端口批处理

发布:2013-12-13 | 查看: 6575 次 | 收藏 |

此页面上的内容需要较新版本的 Adobe Flash Player。

获取 Adobe Flash Player

此文内容转自网维大师论坛 

http://bbs.icafe8.com/forum.php?mod=viewthread&tid=347672&fromuid=454347


下载附件封端口批处理:IPSec.rar,解压后双击运行即可。以下为批处理具体内容。


@echo off

title 创建IP安全策略,屏蔽135、139 . . . 等端口 (win7)

netsh ipsec static add policy name=qianye

netsh ipsec static add filterlist name=Filter1

netsh ipsec static add filter filterlist=Filter1 srcaddr=any dstaddr=Me dstport=135 protocol=TCP

netsh ipsec static add filter filterlist=Filter1 srcaddr=any dstaddr=Me dstport=139 protocol=TCP

netsh ipsec static add filter filterlist=Filter1 srcaddr=any dstaddr=Me dstport=445 protocol=TCP

netsh ipsec static add filter filterlist=Filter1 srcaddr=any dstaddr=Me dstport=1443 protocol=TCP

netsh ipsec static add filter filterlist=Filter1 srcaddr=any dstaddr=Me dstport=1444 protocol=TCP

netsh ipsec static add filter filterlist=Filter1 srcaddr=any dstaddr=Me dstport=135 protocol=UDP

netsh ipsec static add filter filterlist=Filter1 srcaddr=any dstaddr=Me dstport=139 protocol=UDP

netsh ipsec static add filter filterlist=Filter1 srcaddr=any dstaddr=Me dstport=445 protocol=UDP

netsh ipsec static add filter filterlist=Filter1 srcaddr=any dstaddr=Me dstport=1443 protocol=UDP

netsh ipsec static add filter filterlist=Filter1 srcaddr=any dstaddr=Me dstport=1444 protocol=UDP

netsh ipsec static add filteraction name=FilteraAtion1 action=block

netsh ipsec static add rule name=Rule1 policy=qianye filterlist=Filter1 filteraction=FilteraAtion1

netsh ipsec static set policy name=qianye assign=y

exit


分享到:

相关文章推荐:

加入收藏夹失败,请使用Ctrl+D进行添加
评价已提交,感谢您的参与
评价已提交,感谢您的参与