cancel
Showing results for 
Search instead for 
Did you mean: 

limit IP access to certain URIs

veredgf
Nimbostratus
Nimbostratus

Hi,

 

I am looking for help creating an IRULE for the following conditions:

 

  1. Allow access to two URIs within the policy to a specific group of IPs.
  2. Disallow access to these URIs to all other IPs.

 

I tried creating a traffic policy for this but was unsuccessful.

 

Thanks

 

Vered

1 REPLY 1

Dmitry
Altocumulus
Altocumulus

it will be look like there:

 

when HTTP_REQUEST { if { [ class match [ string tolower [HTTP::uri] ] starts_with dg_uri ] and not ( [class match IP::client_addr] equals private_net] ) } { HTTP::respond 302 noserver Location "http://[HTTP::host]/errorpage.html" } }

 

dg_uri is data group list with your URIs (type string)

private_net is data group list with your IPs/subnets (type address)