首页 > 编程 > BAT > 正文

用批处理设置IP安全策略的代码

2020-06-09 14:17:43
字体:
来源:转载
供稿:网友
以下内容只有回复后才可以浏览
  ipseccmd -w REG -p "XIAOWANG" -r "Block ICMP" -f *+0:ICMP -n BLOCK -x
  
  
  开网上邻居.bat
  
复制代码 代码如下:

  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/80" -f *+0:80:TCP -n PASS -x
  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/135" -f *+0:135:TCP -n PASS -x
  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/139" -f *+0:139:TCP -n PASS -x
  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/445" -f *+0:445:TCP -n PASS -x
  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/1025" -f *+0:1025:TCP -n PASS -x
  rem ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/3389" -f *+0:3389:TCP -n PASS -x
  ipseccmd -w REG -p "XIAOWANG" -r "Block UDP/135" -f *+0:135:UDP -n PASS -x
  ipseccmd -w REG -p "XIAOWANG" -r "Block UDP/139" -f *+0:139:UDP -n PASS -x
  ipseccmd -w REG -p "XIAOWANG" -r "Block UDP/445" -f *+0:445:UDP -n PASS -x
  ipseccmd -w REG -p "XIAOWANG" -r "Block UDP/1434" -f *+0:1434:UDP -n PASS -x
  
  禁sql端口.bat
  
  以下内容只有回复后才可以浏览
复制代码 代码如下:

  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/1433" -f *+0:1433:TCP -n BLOCK -x
  ipseccmd -w REG -p "XIAOWANG" -r "Block UDP/1433" -f *+0:1433:UDP -n BLOCK -x
  
  禁危险端口.bat
  
  rem ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/80" -f *+0:80:TCP -n BLOCK -x
  rem ipseccmd -w REG -p "XIAOWANG" -r "Block UDP/1434" -f *+0:1434:UDP -n BLOCK -x
  rem ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/3389" -f *+0:3389:TCP -n BLOCK -x
  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/445" -f *+0:445:TCP -n BLOCK -x >nul
  ipseccmd -w REG -p "XIAOWANG" -r "Block UDP/445" -f *+0:445:UDP -n BLOCK -x >nul
  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/1025" -f *+0:1025:TCP -n BLOCK -x >nul
  ipseccmd -w REG -p "XIAOWANG" -r "Block UDP/139" -f *+0:139:UDP -n BLOCK -x >nul
  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/1068" -f *+0:1068:TCP -n BLOCK -x >nul
  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/5554" -f *+0:5554:TCP -n BLOCK -x >nul
  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/9995" -f *+0:9995:TCP -n BLOCK -x >nul
  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/9996" -f *+0:9996:TCP -n BLOCK -x >nul
  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/6129" -f *+0:6129:TCP -n BLOCK -x >nul
  ipseccmd -w REG -p "XIAOWANG" -r "Block ICMP/255" -f *+0:255:ICMP -n BLOCK -x >nul
  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/43958" -f *+0:43958:TCP -n BLOCK -x >nul
  echo 关闭流行危险端口…………OK!
  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/20034" -f *+0:20034:TCP -n BLOCK -x >nul
  echo 关闭木马NetBus Pro开放的端口…………OK!
  ipseccmd -w REG -p "XIAOWANG" -r "Block TCP/1092" -f *+0:1092:TCP -n BLOCK -x >nul
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表