cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

3728
Views
0
Helpful
2
Replies
Highlighted

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.

2 REPLIES 2
Highlighted
Cisco Employee

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

Highlighted

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

Content for Community-Ad