Forum Discussion

Randy_Johnson_L's avatar
Randy_Johnson_L
Icon for Nimbostratus rankNimbostratus
Jul 19, 2017

Temporarily block IP address -

We've been pretty successful blocking rogue players using a DataGroup and a simple iRule. However, now the goal is to populate this DataGroup dynamically, blocking and unblocking on a schedule, or timer. Is anyone aware of the ability to set 'timers' for something like this ?

 

2 Replies

  • If you are licensed for BIG-IP Advanced Firewall Manager (AFM), it provides the functionality you are looking for via its IP Intelligence features. I can't think of a way to do this easily or effectively with an iRule - at least not without severely limiting performance - but perhaps someone else has a suggestion.

     

  • Simple example, but you could do something like this to define your schedule. Needless to say, if you want a more complicated schedule you'd need to have more complicated conditions e.g. $curTime is greater than timeA and less than timeB

    set curTime "[clock format [clock seconds] -format %H%M%S]"
    set pm 120000
    
    if { $curTime < $pm } {
         It's AM - Do something
    } elseif { $curTime > $pm } {
         It's PM - Do something
    }