ASA 日志记录 IPSec

网络工程 思科 虚拟专用网 网络安全
2021-07-30 13:02:44

有人可以就如何在 ASA 上启用 IPSec 隧道登录提供一些提示吗?我有典型的 S2S IPSec 场景,我喜欢监控它何时出现故障和其他信息。但找不到办法做到这一点。

1个回答

一般记录

要记录 IPSec 事件,您需要运行以下命令:

logging enable
logging emblem ! (optional for Cisco's emblem format)
logging timestamp
logging buffered notifications 

当您将缓冲日志发送到 FTP 服务器时,其中一些命令已经在您的 ASA 上。因此,我不会包括 FTP 命令。然后,您需要在 FTP 服务器的日志中查找您感兴趣特定代码

IPSec L2L 断开连接消息示例:

%ASA-4-113019:组 = 202.XXX.YYY.ZZZ,用户名 = 202.XXX.YYY.ZZZ,IP = 202.XXX.YYY.ZZZ,会话已断开。会话类型:LAN 到 LAN,持续时间:1d 1h:13m:46s,字节 xmt:372142455,字节 rcv:384146009,原因:丢失服务

电子邮件通知

首先创建要捕获的事件列表。

捕获所有 IPSec 列表

logging list IPSec_Notifications level notification class vpn

具体事件列表

logging list IPSec_Notifications message 113019
! Replace XXXXXX with next code
logging list IPSec_Notifications message XXXXXX
! Repeat for the rest of the codes you're interested in

现在设置电子邮件设置。

logging mail IPSec_Notifications
logging from-address your-from-address@your-domain.com
logging recipient-address who-should-receive-emails@your-domain.com level notifications
smtp-server X.X.X.X ! Replace with your SMTP server IP

笔记

以上所有日志记录仅限于通知和更高级别(即级别 5、4、3、2 和 1)。如果您发现较低级别的代码,则需要替换level notificationslevel informationallevel debugging

上面的示例事件 ( ASA-4-113019) 是level warnings您可以从ASA-4事件前缀中看到的。