cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5505
Views
0
Helpful
2
Replies

Filter CLI logging on ASA by source or dst port

Justin Westover
Level 1
Level 1

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

mirober2
Cisco Employee
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

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

Review Cisco Networking products for a $25 gift card