Verbose ACL loggingPosted by stretch in Networking on Thursday, 8 Jan 2009 at 12:00 a.m. GMTCisco IOS provides the capability to log matches against access list expressions by appending the
An ACL has been created to block SSH traffic on R1, and applied inbound on the FastEthernet0/0 and FastEthernet0/1 interfaces: When an administrator attempts to SSH to R1 from one of the other routers, the TCP connection is rejected by R1 and its ACL counter increased appropriately: The stock ACL counters give us a good idea of how much traffic is being allowed or rejected, but not where that traffic is coming from (or going to). We can alter the first entry in our Now SSH traffic will continue to be blocked and the ACL counters to increase, but the router will also generate a log message indicating when the match occurred, where the packet came from, and where the packet was headed: This is certainly handy, but what if we expand our topology to include a LAN (192.168.0.0/24) attached to both R1 and R2?
Imagine R2 and R3 are also supposed to be blocking SSH traffic, but one of them has had its ACL mistakenly erased. If a user from the LAN attempts to SSH to R1 via the unsecured router, the traffic will still be blocked at R1, but the log message won't help us determine where the leak is: To provide even more detail in our ACL log entries, we can replace the Here's what the log records when the same SSH attempt from the LAN is repeated: Now we can easily determine both the incoming interface (FastEthernet0/1) and the source MAC address from the prior hop (c203.73ae.0001). Note that this MAC belongs to R3, not the origin host. These attributes clearly point to R3 as the unsecured router, and we can now move to secure it. |
Navigation
Armory
Online Toolbox
|
Hi,
Great work !!!
offtopic
Did you know why in OSPF appears DR 0.0.0.0 and BDR 0.0.0.0.
Logging ACL hits can easily become a self-DoS in high-traffic situations due to the CPU consumed to generate the syslog output. Rate-limiting is available, but then one loses granularity.
NetFlow telemetry export/collection/analysis is generally a much better way to gain visibility into network behaviors, classify attack traffic, et. al.
Nice. I always use the log command. Have not used the log-input command though.
Once I had a problem with NAT on a 800 series router where I used the log command and NAT would not work. When I wrote the ACL without log again, it worked.
Very useful.
Thanks for that post.
Very useful
I have the same problem with NAT when "log" in ACL was used - router 2811, full IOS image. But I have not found explanation for this behavior yet. Does anyone have experience with this problem?