Hi Brandon,
Thanks for that. I must confess that I'd forgotten about deny-cpu, and have used it in the past. The very fact that is there means that this should be easily do-able, which is frustrating.
It certainly helps (in that you can, to a degree, stop worrying about the traffic going through the switch and focus on the CPU itself) but it comes with two main issues:
Firstly, there's no single place to apply it between data and control plane so you still have to apply an ACL with the relevant terms on all ingress ports of the switch, and bear in mind that some of these ports or VLANs may require other ACL terms as well, you can end up with a situation where there are multiple policy files to keep in sync manually. There's also the issue of hardware resources when you go here - as I'm always a little worried that in such a scenario, you edit one term on a port with a 'busy' and suddenly you're out of slice capacity. The TAC are great at helping to optimise policy files - and explain how best to do it - but there's finite capacity in the silicon.
Secondly, from a security standpoint, denying things you know about and permitting everything else isn't great.
The first one of these is, to my mind, the bigger problem. You know, for example, that the switch is listening on ports 22, 179, 80 etc. and can have a set of permits at the top of your policy for known sources to anywhere, and then a deny-cpu from anywhere afterwards - first match wins so that should work, and it is a step in the right direction. I'll go and refine my messy ACLs to be slightly neater 🙂
I don't think copy-cpu-off helps here, as I understood it, it only prevents a packet that you've already set 'copy-cpu' on from being mirrored to the CPU (and if the packet is destined only for the CPU, it is functionally equivalent to deny-cpu).
Paul.