Forum Discussion
hirox_127495
Aug 02, 2010Historic F5 Account
How do I drop packet from iRules?
Hello,
I created following iRule to enforce connection/second. This iRule supposes to drop client request when LTM get more than 5 connections per second. But actual behavior of 10.2 was send RST back to the client in my verification.
How do I modify this iRule to work as I expected?
---------------------------------------
when CLIENT_ACCEPTED {
set reqno [table incr "reqs"]
table set -subtable "reqrate" $reqno "ignored" indefinite 1
set ConRate [table keys -count -subtable "reqrate"]
if { $ConRate > 5 } {
drop
event disable
return
}
}
---------------------------------------
Thanks!
- The_Bhattman
Nimbostratus
Have you looked at the following code share? - hirox_127495Historic F5 AccountThank you for the information but I just want to know behavior of "drop" command.
- hoolio
Cirrostratus
I'd have expected drop to either drop the current packet or to remove the connection table entry. I'd guess that drop called in CLIENT_ACCEPTED would remove the connection table entry. Maybe if it's used in a DATA event (like CLIENT_DATA or SERVER_DATA) it would just drop the current packet. If the connection table entry is removed and the client sends another packet, LTM should reset it as it's not associated with an existing connection.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects