Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Step-by-Step Configuration and Troubleshooting Best Practices for the NGFW, NGIPS and AMP Technologies A Visual Guide to the Cisco Firepower Threat Defense (FTD)
New Member

Filter CLI logging on ASA by source or dst port

I know there has to be a way to filter the logging on the ASA CLI. The "sh logging" command is obviously all logs on the ASA but i would like to filter the logging based on perhaps a source IP or dst ip or port. I can do this in the ASDM using the logging tool but i perfer using the CLI. Is there a regular expression or something that I need to use? I know i can use "sh loggin | in 10.10.0.1" (ip based). But that shows all logs for source or destination 10.10.0.1. I need to specify. Thanks.

Everyone's tags (3)
2 REPLIES
Cisco Employee

Filter CLI logging on ASA by source or dst port

Hi Justin,

For source IP, you can do something like this:

show log | grep for .*:

For destination IP, you would use:

show log | grep to .*:

-Mike

New Member

Filter CLI logging on ASA by source or dst port

What If I wanted to filter on source and destination IP addresses? I tried show log | grep to .*: for .*: but that didn't work?

2369
Views
0
Helpful
2
Replies
CreatePlease to create content