07-12-2021 05:54 AM
Hello, I want to prevent repetitive command, which is tried certain times in certain seconds.
For example, when i type the show ip route 3 times in 5 seconds, IOS block the 3rd command. How can i accomplish this?
Solved! Go to Solution.
08-01-2021 07:02 PM
Hello,
You can try this script EEM that just created and tested works well :
event manager applet slow
event cli pattern "show ip route" sync yes occurs 3 period 5000
action 001 syslog msg "You are too fast! Please slow down"
action 002 wait 10
Hope that helps.
07-12-2021 06:02 AM
As far as I know, it is not possible to enforce such a limit on the IOS device itself.
There is a similar feature for failed authentications (logins); but that's limited to that activity and not a general purpose command.
08-01-2021 07:02 PM
Hello,
You can try this script EEM that just created and tested works well :
event manager applet slow
event cli pattern "show ip route" sync yes occurs 3 period 5000
action 001 syslog msg "You are too fast! Please slow down"
action 002 wait 10
Hope that helps.
08-02-2021 01:19 AM
Thanks, but I have another thing to ask.
I want to print "Your command is blocked" like usual output, not the syslog message. Do you know how to achieve this? I tried to use "echo" command, but it doesn't work at all.
08-02-2021 08:11 AM
Hello,
If you want an output message instead of syslog then :
action 001 puts "Your command is blocked"
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide