Forum Discussion
neeeewbie
Jan 11, 2022MVP
Hi
I guess user's session timeout value relate to timeout value
and then concurrent session is using below irule
when RULE_INIT {
set static::maxquery 1
set static::holdtime 600
}
when CLIENT_ACCEPTED {
set srcip [clientside {IP::local_addr}]
if { [table lookup -subtable "blacklist" $srcip] != "" } {
drop
return
log local0. "abc"
}
set curtime [clock second]
set key "count:$srcip:$curtime"
set count [table incr $key]
table lifetime $key 600
log local0. $count
if { $count > $static::maxquery } {
table add -subtable "blacklist" $srcip "blocked" indef $static::holdtime
log local0. "excute"
table delete $key
drop
return
}
}