Forum Discussion

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

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




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 {









rule restrict-rule {




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.




25 Replies