通过 ssh 调试加密 ipsec

网络工程 思科 网络安全 ssh 日志记录
2021-07-25 16:47:37

如何使用 SSH 在 ASA 上调试 IP Sec VPN?debug crypto ipsec terminal monitor logging monitor如果我选择调试,我尝试 它要求完成,所有调试信息都被淹没了。如何通过 SSH 仅查看 IPSEC 调试?

2个回答

如果要调试单个 L2L VPN 连接,可以启用以下配置

ASA# debug crypto condition peer 1.1.1.1

这应该将调试限制为仅此特定的 L2L VPN Peer

您可以使用以下命令确认设置

ASA# sh crypto debug-condition
Crypto conditional debug is turned ON
IKE debug context unmatched flag:  OFF
IPSec debug context unmatched flag:  OFF
IKE debug context error flag:  OFF
IPSec debug context error flag:  OFF
IKE peer IP address filters:
1.1.1.1/32

在此之后,您可以使用debug crypto isakmpdebug crypto ipsec命令

完成后,请务必删除我们使用命令设置的上述条件

ASA# debug crypto condition reset
Do you want to clear the crypto debug filters? [confirm]

此外,您可能需要更改监视器的日志记录杆

logging monitor debugging

并在 SSH 连接期间发出命令

terminal monitor

并禁用它输入

terminal no monitor

您应该能够禁用所有调试

no debug all

- 朱尼

您要调试的大多数 VPN 问题都可以通过调试调试的 IKE 部分来解决。顺便说一句,我假设您的意思是在 SSH 进入 ASA 时进行调试。

*取决于您的代码版本

debug crypto ikev1 1-254(从 127 开始,然后是 254) debug crypto ikev2 1-254(从 127 开始,然后是 254)

debug crypto isakmp 1-254(从 127 开始,然后是 254)

这将自动将调试输出直接显示到您的终端,但仅与 IPsec VPN 相关。请记住,如果您的活动流量不断流动,试图建立隧道并可能溢出您的终端,则此输出可能非常冗长。

其它你可能感兴趣的问题