Skip to content

Commit

Permalink
Added a template for cisco_ftd_show_vpn-sessiondb_anyconnect (#1552)
Browse files Browse the repository at this point in the history
  • Loading branch information
manofcolombia authored Nov 3, 2023
1 parent 83df6ec commit 8a8a533
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Value Filldown,Required SESSION_TYPE (\S+)
Value USERNAME (\S+)
Value Required INDEX (\d+)
Value ASSIGNED_IP (\d+\.\d+\.\d+\.\d+)
Value PUBLIC_IP (\S+)
Value ASSIGNED_IPV6 (\S+)
Value PROTOCOL (.+?)
Value LICENSE (.+?)
Value ENCRYPTION (.+?)
Value HASHING (.+?)
Value BYTES_TX (\d+)
Value BYTES_RX (\d+)
Value GROUP_POLICY (\S+)
Value TUNNEL_GROUP (\S+)
Value LOGIN_TIME (\d+:\d+:\d+)
Value LOGIN_TIME_ZONE (\S+)
Value LOGIN_WEEKDAY (\w+)
Value LOGIN_MONTH (\w+)
Value LOGIN_DAY (\d+)
Value LOGIN_YEAR (\d+)
Value DURATION (.+?)
Value INACTIVITY (.+?)
Value VLAN_MAPPING (\S+)
Value VLAN_ID (.+?)
Value AUDT_SESS_ID (.+?)
Value SECURITY_GRP (\S+)
Value TUNNEL_ZONE (\d+)

Start
^Session\s+Type:\s+${SESSION_TYPE}$$ -> Connection

Connection
^\s*Username\s*:\s+${USERNAME}\s+Index\s+:\s*${INDEX}$$
^\s*Username\s*:\s+${USERNAME}$$
^\s*Index\s*:\s+${INDEX}$$
^\s*Assigned\s+IP\s*:\s+${ASSIGNED_IP}\s+Public\s*IP\s*:\s*${PUBLIC_IP}$$
^\s*Assigned\s+IP\s*:\s+${ASSIGNED_IP}$$
^\s*Assigned\s+IPv6\s*:\s+${ASSIGNED_IPV6}$$
^\s*Public\s+IP\s*:\s+${PUBLIC_IP}$$
^\s*Protocol\s+:\s+${PROTOCOL}$$
^\s*License\s+:\s*${LICENSE}$$
^\s*Encryption\s+:\s*${ENCRYPTION}$$
^\s*Hashing\s+:\s*${HASHING}$$
^\s*Bytes\s+Tx\s+:\s+${BYTES_TX}\s+Bytes\s+Rx\s+:\s+${BYTES_RX}$$
^\s*Group\s+Policy\s+:\s+${GROUP_POLICY}\s+Tunnel\s+Group\s+:\s+${TUNNEL_GROUP}$$
^\s*Group\s+Policy\s+:\s+${GROUP_POLICY}$$
^\s*Tunnel\s+Group\s+:\s+${TUNNEL_GROUP}$$
^\s*Login\s+Time\s+:\s+${LOGIN_TIME}\s+${LOGIN_TIME_ZONE}\s+${LOGIN_WEEKDAY}\s+${LOGIN_MONTH}\s+${LOGIN_DAY}\s+${LOGIN_YEAR}$$
^\s*Duration\s+:\s+${DURATION}$$
^\s*Inactivity\s+:\s+${INACTIVITY}$$
^\s*VLAN\s+Mapping\s+:\s+${VLAN_MAPPING}\s+VLAN\s+:\s+${VLAN_ID}$$
^\s*Audt\s+Sess\s+ID\s+:\s+${AUDT_SESS_ID}$$
^\s*Security\s+Grp\s+:\s+${SECURITY_GRP}\s+Tunnel\s+Zone\s+:\s+${TUNNEL_ZONE}$$ -> Record
^\s*$$
^. -> Error
2 changes: 2 additions & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ cisco_asa_show_nat.textfsm, .*, cisco_asa, sh[[ow]] nat
cisco_asa_ping.textfsm, .*, cisco_(asa|ftd), ping
cisco_asa_dir.textfsm, .*, cisco_asa, dir

cisco_ftd_show_vpn-sessiondb_anyconnect.textfsm, .*, cisco_ftd, sh[[ow]] vpn-[[sessiondb]] a[[nyconnect]]

cisco_ios_show_module.textfsm:cisco_ios_show_module_status.textfsm:cisco_ios_show_module_submodule.textfsm:cisco_ios_show_module_online_diag.textfsm, .*, cisco_ios, sh[[ow]] mod[[ule]]
cisco_ios_show_switch_detail.textfsm:cisco_ios_show_switch_detail_stack_ports.textfsm, .*, cisco_ios, sh[[ow]] sw[[itch]] d[[etail]]
cisco_ios_show_running-config_partition_access-list.textfsm, .*, cisco_ios, sh[[ow]] ru[[nning-config]] p[[artition]] a[[ccess-list]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Session Type: AnyConnect

Username : USER Index : 7033
Assigned IP : 10.0.0.1 Public IP : 1.1.1.1
Protocol : AnyConnect-Parent SSL-Tunnel DTLS-Tunnel
License : AnyConnect Premium
Encryption : AnyConnect-Parent: (1)none SSL-Tunnel: (1)AES-GCM-256 DTLS-Tunnel: (1)AES-GCM-256
Hashing : AnyConnect-Parent: (1)none SSL-Tunnel: (1)SHA384 DTLS-Tunnel: (1)SHA384
Bytes Tx : 67583000 Bytes Rx : 20229428
Group Policy : ABC_GRP_POL Tunnel Group : DefaultWEBVPNGroup
Login Time : 05:06:11 UTC Fri Oct 20 2023
Duration : 12h:51m:51s
Inactivity : 0h:00m:00s
VLAN Mapping : N/A VLAN : none
Audt Sess ID : d05f30eb01b7900065320ac3
Security Grp : none Tunnel Zone : 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
parsed_sample:
- assigned_ip: "10.0.0.1"
assigned_ipv6: ""
audt_sess_id: "d05f30eb01b7900065320ac3"
bytes_rx: "20229428"
bytes_tx: "67583000"
duration: "12h:51m:51s"
encryption: "AnyConnect-Parent: (1)none SSL-Tunnel: (1)AES-GCM-256 DTLS-Tunnel:\
\ (1)AES-GCM-256"
group_policy: "ABC_GRP_POL"
hashing: "AnyConnect-Parent: (1)none SSL-Tunnel: (1)SHA384 DTLS-Tunnel: (1)SHA384"
inactivity: "0h:00m:00s"
index: "7033"
license: "AnyConnect Premium"
login_day: "20"
login_month: "Oct"
login_time: "05:06:11"
login_time_zone: "UTC"
login_weekday: "Fri"
login_year: "2023"
protocol: "AnyConnect-Parent SSL-Tunnel DTLS-Tunnel"
public_ip: "1.1.1.1"
security_grp: "none"
session_type: "AnyConnect"
tunnel_group: "DefaultWEBVPNGroup"
tunnel_zone: "0"
username: "USER"
vlan_id: "none"
vlan_mapping: "N/A"

0 comments on commit 8a8a533

Please sign in to comment.