What I’m attempting to do with the below iRule (and struggling to accomplish) is to allow public addresses to connect to the servers after coming in with a /home request, but then to restrict access to certain networks when requesting /web-services. All other requests should be getting rejected. I’ve been tweaking this rule trying to get it to work for quite a while and after applying in it’s current state it is still allowing access to /*. Any help on this is appreciated.
when HTTP_REQUEST {
if {[HTTP::uri] contains “/home” } {
pool server_pool
}
elseif {[HTTP::uri] contains “/web-services”} {
if {[matchclass [IP::client_addr] equals allowed_networks] }{
pool server_pool
}
else {
reject
}
}
else {
reject
}
}