<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cisco ASA VPN logs regex? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Cisco-ASA-VPN-logs-regex/m-p/441884#M125506</link>
    <description>&lt;P&gt;Here you go:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=asa "USERSEARCH"|

eval comment="extraction_common" | rex field=_raw "^(?&amp;lt;month&amp;gt;\S+?)\s+?(?&amp;lt;day&amp;gt;\S+?) (?&amp;lt;time&amp;gt;\S+?) (?&amp;lt;ip&amp;gt;\S+?) %(?&amp;lt;asa&amp;gt;[^:]+?): (?&amp;lt;unregexed&amp;gt;[\s\S]*)" | 

eval comment="extraction_group" | rex field=unregexed "(?&amp;lt;category&amp;gt;[^&amp;lt;=]+?)( = | &amp;lt;)(?&amp;lt;group&amp;gt;[^&amp;gt;,]+?)(&amp;gt;|,) Usern?a?m?e? (&amp;lt;|= )(?&amp;lt;user&amp;gt;[^&amp;gt;,]+?)(,|&amp;gt;) IP (&amp;lt;|= )(?&amp;lt;ip&amp;gt;[^&amp;gt;,]+?)(,|&amp;gt;) (?&amp;lt;message&amp;gt;[\s\S]*)" |

eval comment="extraction_tunnelgroup" | rex field=unregexed "(?&amp;lt;category&amp;gt;TunnelGroup) &amp;lt;(?&amp;lt;group&amp;gt;[^&amp;gt;]+?)&amp;gt; GroupPolicy &amp;lt;[^&amp;gt;]+?&amp;gt; User &amp;lt;(?&amp;lt;user&amp;gt;[^&amp;gt;]+?)&amp;gt; IP &amp;lt;(?&amp;lt;ip&amp;gt;[^&amp;gt;]+?)&amp;gt; (?&amp;lt;message&amp;gt;[\s\S]*)" |
eval comment="extraction_teardown" | rex field=unregexed "(?&amp;lt;category&amp;gt;Teardown (UDP|TCP) connection) (?&amp;lt;connection&amp;gt;\d+?) for (?&amp;lt;from&amp;gt;[^:]+?):(?&amp;lt;from_ip&amp;gt;[^/]+?)/(?&amp;lt;from_port&amp;gt;\d+)\(?L?O?C?A?L?.?(?&amp;lt;from_user&amp;gt;[^\)]*?)\)? to (?&amp;lt;to&amp;gt;[^:]+?):(?&amp;lt;to_ip&amp;gt;[^/]+?)/(?&amp;lt;to_port&amp;gt;\d+)\(?L?O?C?A?L?.?(?&amp;lt;to_user&amp;gt;[^\)]*?)\)? duration (?&amp;lt;duration&amp;gt;\S+?) bytes (?&amp;lt;bytes&amp;gt;\d+) ?(?&amp;lt;message&amp;gt;[^\(]*)\(?(?&amp;lt;user&amp;gt;[^\)]*)\)?" |

eval comment="extraction_built" | rex field=unregexed "(?&amp;lt;category&amp;gt;Built (?&amp;lt;direction&amp;gt;inbound|outbound) (?&amp;lt;type&amp;gt;UDP|TCP) connection) (?&amp;lt;connection&amp;gt;\d+?) for (?&amp;lt;from&amp;gt;[^:]+?):(?&amp;lt;from_ip&amp;gt;[^/]+?)/(?&amp;lt;from_port&amp;gt;\d+?) \((?&amp;lt;from_ip2&amp;gt;[^/]+?)/(?&amp;lt;from_port2&amp;gt;\d+?)\)(\(LOCAL.(?&amp;lt;from_user&amp;gt;[^\)]+?)\))? to (?&amp;lt;to&amp;gt;[^:]+?):(?&amp;lt;to_ip&amp;gt;[^/]+?)/(?&amp;lt;to_port&amp;gt;\d+?) \((?&amp;lt;to_ip2&amp;gt;[^/]+?)/(?&amp;lt;to_port2&amp;gt;\d+?)\) ?(\(L?O?C?A?L?\\\?(?&amp;lt;to_user&amp;gt;[^\)]+?)\))?" |
eval comment="extraction_deny" | rex field=unregexed "(?&amp;lt;category&amp;gt;Deny) (?&amp;lt;type&amp;gt;\S+?) src (?&amp;lt;from&amp;gt;[^:]+?):(?&amp;lt;from_ip&amp;gt;[^/]+?)/(?&amp;lt;from_port&amp;gt;\d+?)\(LOCAL.(?&amp;lt;user&amp;gt;[^\)]+?)\) dst (?&amp;lt;to&amp;gt;[^:]+?):(?&amp;lt;to_ip&amp;gt;[^/]+?)/(?&amp;lt;to_port&amp;gt;\d+?) by access-group \"(?&amp;lt;access_group&amp;gt;[^\"]+?)\" \[(?&amp;lt;brackets&amp;gt;[^\]]+?)\]" |
eval comment="extraction_disconnected" | rex field=unregexed "(?&amp;lt;category&amp;gt;Group) = (?&amp;lt;group&amp;gt;[^,]+?), Username = (?&amp;lt;user&amp;gt;[^,]+?), IP = (?&amp;lt;ip&amp;gt;[^,]+?), Session disconnected. Session Type: (?&amp;lt;type&amp;gt;[^,]+?), Duration: (?&amp;lt;duration&amp;gt;[^,]+?), Bytes xmt: (?&amp;lt;bytes_xmt&amp;gt;[^,]+?), Bytes rcv: (?&amp;lt;bytes_rcv&amp;gt;[^,]+?), Reason: (?&amp;lt;reason&amp;gt;[\s\S]+)" |
eval comment="extraction_access-list" | rex field=unregexed "(?&amp;lt;category&amp;gt;access-list StaffVPNACL-EXT2 denied) (?&amp;lt;type&amp;gt;\S+?) for user \'(?&amp;lt;user&amp;gt;[^\']+?)\' (?&amp;lt;from&amp;gt;[^/]+?)/(?&amp;lt;from_ip&amp;gt;[^\(]+?)\((?&amp;lt;from_port&amp;gt;[^\)]+?)\) -&amp;gt; (?&amp;lt;to&amp;gt;[^/]+?)/(?&amp;lt;to_ip&amp;gt;[^\(]+?)\((?&amp;lt;to_port&amp;gt;[^\)]+?)\) hit-cnt 1 first hit \[(?&amp;lt;brackets&amp;gt;[^\]]+?)\]" |

eval comment="AAA" | rex field=unregexed "(?&amp;lt;category&amp;gt;AAA user authentication Rejected) : reason = (?&amp;lt;reason&amp;gt;[^:]+?) : server = (?&amp;lt;server&amp;gt;[^:]+?) : user = (?&amp;lt;user&amp;gt;[^:]+?) : user IP = (?&amp;lt;ip&amp;gt;\S+)" |

search user="USERSEARCH" OR to_user="USERSEARCH" OR from_user="USERSEARCH" |

lookup dnslookup clientip as ip OUTPUT clienthost as ip_resolved | lookup dnslookup clientip as from_ip OUTPUT clienthost as from_ip_resolved | lookup dnslookup clientip as from_ip2 OUTPUT clienthost as from_ip2_resolved | lookup dnslookup clientip as to_ip OUTPUT clienthost as to_ip_resolved | lookup dnslookup clientip as to_ip2 OUTPUT clienthost as to_ip2_resolved |

table _time unregexed category connection user from from_ip from_ip_resolved from_port from_user from_ip2 from_ip2_resolved from_port2 to to_ip to_ip_reoslved to_port to_user to_ip2 to_ip2_resolved to_port2 ip ip_resolved server type reason message group access_group direction duration bytes bytes_xmt bytes_rcv brackets sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 07 May 2019 19:43:02 GMT</pubDate>
    <dc:creator>nick405060</dc:creator>
    <dc:date>2019-05-07T19:43:02Z</dc:date>
    <item>
      <title>Cisco ASA VPN logs regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cisco-ASA-VPN-logs-regex/m-p/441883#M125505</link>
      <description>&lt;P&gt;Hey guys,&lt;/P&gt;

&lt;P&gt;I am ingesting VPN logs and would like to parse them out. Does anyone have regexes to use?&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 19:40:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cisco-ASA-VPN-logs-regex/m-p/441883#M125505</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-05-07T19:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco ASA VPN logs regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cisco-ASA-VPN-logs-regex/m-p/441884#M125506</link>
      <description>&lt;P&gt;Here you go:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=asa "USERSEARCH"|

eval comment="extraction_common" | rex field=_raw "^(?&amp;lt;month&amp;gt;\S+?)\s+?(?&amp;lt;day&amp;gt;\S+?) (?&amp;lt;time&amp;gt;\S+?) (?&amp;lt;ip&amp;gt;\S+?) %(?&amp;lt;asa&amp;gt;[^:]+?): (?&amp;lt;unregexed&amp;gt;[\s\S]*)" | 

eval comment="extraction_group" | rex field=unregexed "(?&amp;lt;category&amp;gt;[^&amp;lt;=]+?)( = | &amp;lt;)(?&amp;lt;group&amp;gt;[^&amp;gt;,]+?)(&amp;gt;|,) Usern?a?m?e? (&amp;lt;|= )(?&amp;lt;user&amp;gt;[^&amp;gt;,]+?)(,|&amp;gt;) IP (&amp;lt;|= )(?&amp;lt;ip&amp;gt;[^&amp;gt;,]+?)(,|&amp;gt;) (?&amp;lt;message&amp;gt;[\s\S]*)" |

eval comment="extraction_tunnelgroup" | rex field=unregexed "(?&amp;lt;category&amp;gt;TunnelGroup) &amp;lt;(?&amp;lt;group&amp;gt;[^&amp;gt;]+?)&amp;gt; GroupPolicy &amp;lt;[^&amp;gt;]+?&amp;gt; User &amp;lt;(?&amp;lt;user&amp;gt;[^&amp;gt;]+?)&amp;gt; IP &amp;lt;(?&amp;lt;ip&amp;gt;[^&amp;gt;]+?)&amp;gt; (?&amp;lt;message&amp;gt;[\s\S]*)" |
eval comment="extraction_teardown" | rex field=unregexed "(?&amp;lt;category&amp;gt;Teardown (UDP|TCP) connection) (?&amp;lt;connection&amp;gt;\d+?) for (?&amp;lt;from&amp;gt;[^:]+?):(?&amp;lt;from_ip&amp;gt;[^/]+?)/(?&amp;lt;from_port&amp;gt;\d+)\(?L?O?C?A?L?.?(?&amp;lt;from_user&amp;gt;[^\)]*?)\)? to (?&amp;lt;to&amp;gt;[^:]+?):(?&amp;lt;to_ip&amp;gt;[^/]+?)/(?&amp;lt;to_port&amp;gt;\d+)\(?L?O?C?A?L?.?(?&amp;lt;to_user&amp;gt;[^\)]*?)\)? duration (?&amp;lt;duration&amp;gt;\S+?) bytes (?&amp;lt;bytes&amp;gt;\d+) ?(?&amp;lt;message&amp;gt;[^\(]*)\(?(?&amp;lt;user&amp;gt;[^\)]*)\)?" |

eval comment="extraction_built" | rex field=unregexed "(?&amp;lt;category&amp;gt;Built (?&amp;lt;direction&amp;gt;inbound|outbound) (?&amp;lt;type&amp;gt;UDP|TCP) connection) (?&amp;lt;connection&amp;gt;\d+?) for (?&amp;lt;from&amp;gt;[^:]+?):(?&amp;lt;from_ip&amp;gt;[^/]+?)/(?&amp;lt;from_port&amp;gt;\d+?) \((?&amp;lt;from_ip2&amp;gt;[^/]+?)/(?&amp;lt;from_port2&amp;gt;\d+?)\)(\(LOCAL.(?&amp;lt;from_user&amp;gt;[^\)]+?)\))? to (?&amp;lt;to&amp;gt;[^:]+?):(?&amp;lt;to_ip&amp;gt;[^/]+?)/(?&amp;lt;to_port&amp;gt;\d+?) \((?&amp;lt;to_ip2&amp;gt;[^/]+?)/(?&amp;lt;to_port2&amp;gt;\d+?)\) ?(\(L?O?C?A?L?\\\?(?&amp;lt;to_user&amp;gt;[^\)]+?)\))?" |
eval comment="extraction_deny" | rex field=unregexed "(?&amp;lt;category&amp;gt;Deny) (?&amp;lt;type&amp;gt;\S+?) src (?&amp;lt;from&amp;gt;[^:]+?):(?&amp;lt;from_ip&amp;gt;[^/]+?)/(?&amp;lt;from_port&amp;gt;\d+?)\(LOCAL.(?&amp;lt;user&amp;gt;[^\)]+?)\) dst (?&amp;lt;to&amp;gt;[^:]+?):(?&amp;lt;to_ip&amp;gt;[^/]+?)/(?&amp;lt;to_port&amp;gt;\d+?) by access-group \"(?&amp;lt;access_group&amp;gt;[^\"]+?)\" \[(?&amp;lt;brackets&amp;gt;[^\]]+?)\]" |
eval comment="extraction_disconnected" | rex field=unregexed "(?&amp;lt;category&amp;gt;Group) = (?&amp;lt;group&amp;gt;[^,]+?), Username = (?&amp;lt;user&amp;gt;[^,]+?), IP = (?&amp;lt;ip&amp;gt;[^,]+?), Session disconnected. Session Type: (?&amp;lt;type&amp;gt;[^,]+?), Duration: (?&amp;lt;duration&amp;gt;[^,]+?), Bytes xmt: (?&amp;lt;bytes_xmt&amp;gt;[^,]+?), Bytes rcv: (?&amp;lt;bytes_rcv&amp;gt;[^,]+?), Reason: (?&amp;lt;reason&amp;gt;[\s\S]+)" |
eval comment="extraction_access-list" | rex field=unregexed "(?&amp;lt;category&amp;gt;access-list StaffVPNACL-EXT2 denied) (?&amp;lt;type&amp;gt;\S+?) for user \'(?&amp;lt;user&amp;gt;[^\']+?)\' (?&amp;lt;from&amp;gt;[^/]+?)/(?&amp;lt;from_ip&amp;gt;[^\(]+?)\((?&amp;lt;from_port&amp;gt;[^\)]+?)\) -&amp;gt; (?&amp;lt;to&amp;gt;[^/]+?)/(?&amp;lt;to_ip&amp;gt;[^\(]+?)\((?&amp;lt;to_port&amp;gt;[^\)]+?)\) hit-cnt 1 first hit \[(?&amp;lt;brackets&amp;gt;[^\]]+?)\]" |

eval comment="AAA" | rex field=unregexed "(?&amp;lt;category&amp;gt;AAA user authentication Rejected) : reason = (?&amp;lt;reason&amp;gt;[^:]+?) : server = (?&amp;lt;server&amp;gt;[^:]+?) : user = (?&amp;lt;user&amp;gt;[^:]+?) : user IP = (?&amp;lt;ip&amp;gt;\S+)" |

search user="USERSEARCH" OR to_user="USERSEARCH" OR from_user="USERSEARCH" |

lookup dnslookup clientip as ip OUTPUT clienthost as ip_resolved | lookup dnslookup clientip as from_ip OUTPUT clienthost as from_ip_resolved | lookup dnslookup clientip as from_ip2 OUTPUT clienthost as from_ip2_resolved | lookup dnslookup clientip as to_ip OUTPUT clienthost as to_ip_resolved | lookup dnslookup clientip as to_ip2 OUTPUT clienthost as to_ip2_resolved |

table _time unregexed category connection user from from_ip from_ip_resolved from_port from_user from_ip2 from_ip2_resolved from_port2 to to_ip to_ip_reoslved to_port to_user to_ip2 to_ip2_resolved to_port2 ip ip_resolved server type reason message group access_group direction duration bytes bytes_xmt bytes_rcv brackets sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 May 2019 19:43:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cisco-ASA-VPN-logs-regex/m-p/441884#M125506</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-05-07T19:43:02Z</dc:date>
    </item>
  </channel>
</rss>

