Forum Discussion

Lingaraj_55273's avatar
Lingaraj_55273
Icon for Nimbostratus rankNimbostratus
Feb 04, 2013

iRule for limiting the client connection based to VIP on time base.

 

Hi All,

 

I require your help to write the iRule for limiting the client connection based to VIP on time base.

 

if any one knows or already written kindly share your inputs to me for achiving this.

 

Thanks a lot to you all in advance.

 

 

Regards,

 

Lingaraj R N

 

2 Replies

  • hello,

     

    hope following links work for you

     

    https://devcentral.f5.com/wiki/iRules.HTTP_Session_Limit.ashx

     

     

    https://devcentral.f5.com/wiki/iRules.LimitConnectionsFromClient.ashx

     

     

    https://devcentral.f5.com/wiki/iRules.IP-Filter-iRule.ashx

     

     

    https://devcentral.f5.com/wiki/iRules.HTTP-URI-Request-Limiter.ashx

     

     

    https://devcentral.f5.com/wiki/iRules.HTTPSessionLimit.ashx

     

     

     

    thanks

     

  • This is from Kevin Stewart and this thread: https://devcentral.f5.com/community/group/aft/2165776/asg/502273814. Hope it helps.

    
    when RULE_INIT {
        set static::not_before_time "10am today"
        set static::not_after_time "5pm today"
    }
    when HTTP_REQUEST {
        if { ( [expr [clock seconds] < [clock scan $static::not_before_time]] ) or ( [expr [clock seconds] > [clock scan $static::not_after_time]] ) } {
            HTTP::respond 200 content "After hours - access disabled" "Connection" "Close"
        }
    }