windows ipsec 命令
时间: 2023-07-05 07:23:16 浏览: 218
windows ipseccmd用法
Windows中IPSec的命令可以使用netsh命令行工具来进行配置。以下是一些常用的命令:
1. 创建IPSec策略
```
netsh ipsec static add policy name="<policy_name>" description="<description>" assign=<yes|no>
```
2. 删除IPSec策略
```
netsh ipsec static delete policy name="<policy_name>"
```
3. 添加IPSec策略规则
```
netsh ipsec static add rule name="<rule_name>" policy="<policy_name>" filterlist="<filterlist_name>" filteraction="<permit|block>"
```
4. 删除IPSec策略规则
```
netsh ipsec static delete rule name="<rule_name>" policy="<policy_name>"
```
5. 创建IPSec策略过滤器
```
netsh ipsec static add filterlist name="<filterlist_name>" description="<description>"
```
6. 添加IPSec策略过滤器条件
```
netsh ipsec static add filter filterlist="<filterlist_name>" srcaddr="<source_address>" dstaddr="<destination_address>" protocol="<protocol>" srcport="<source_port>" dstport="<destination_port>"
```
7. 删除IPSec策略过滤器
```
netsh ipsec static delete filterlist name="<filterlist_name>"
```
以上是常用的IPSec命令,更多命令可以在Windows的命令行中输入`netsh ipsec static /?`来查看帮助文档。
阅读全文