Allow specific URI from specific IP's in data group
I have data group class which contains IP Address of my network, i have to restrict some URI's to be access only from my network. i am using this Irule but it is not working for me , earlier i was able to put instruction on basis of FQDN and IP but its not working for uri and client address.
Second Part of Irule is working which rejects requests which for www.example.com and not from my Ip address. Example URL:www.example.com URI: /abc/db, /abc/cd, Ip Class Name: myAddresses
IRULE:
when HTTP_REQUEST {
This Part is not working as it rejects all request for URI
if {[HTTP::uri] eq "/abc/db" or [HTTP::uri] eq "/abc/cd"} { if { [class match [IP::client_addr] equals myAddresses] } { forward } else { reject } }
This Part is working
switch [HTTP::host] { www.example.com { if { [class match [IP::client_addr] equals myAddresses] } { pool example_com } else { discard } } } }