For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

VictorC's avatar
VictorC
Icon for Nimbostratus rankNimbostratus
Jun 21, 2011

HTTP VS: Only allow specific client IP but open specific /uri for all.

Hi,

 

 

Currently I have an iRule on a HTTP VS that discards requests if the client IP is not in the allow class. Now I have to add an extra requirement to allow 'all' if a specific /uri is given. Here's my current iRule (thanks to previous posts found in the forum).

 

 

 

class myallowedclients {

 

host 111.22.33.1

 

host 111.22.33.2

 

}

 

 

rule restrict-rule {

 

when CLIENT_ACCEPTED {

 

if { [matchclass [IP::client_addr] equals $::myallowedclients] }{

 

Do nothing...irule will complete and request will be sent to the pool based on virtual server definition

 

 

} else {

 

 

discard }

 

 

}

 

}

 

 

 

I may have to use this requirement for multiple HTTP VS with the same client allow list, but different pools so it'd be great if I can use one rule for all.

 

 

Thanks in advance.

 

Victor

 

25 Replies