wojo_99069
Feb 07, 2011Nimbostratus
Access control for specific url
All,
I am trying to limit access to a certain url for our company using a iRule, basically all access to api.example.com will need to be open but access to api.example.com/tools will need to be restricted to private networks only. I came up with the iRule with a data group below but it seems to block all access.
when HTTP_REQUEST {
if { ([HTTP::uri] starts_with "/tools") and ([matchclass [IP::remote_addr] equals $$private_net]) }
{ pool api.example.com-443 } else { reject } }
class private_net {
{
network 10.0.0.0/8
network 172.16.0.0/12
network 192.168.0.0/16
}
Any thoughts or suggestions ?
Thanks.