Forum Discussion

aboulleill_3013's avatar
aboulleill_3013
Icon for Nimbostratus rankNimbostratus
Oct 09, 2017

allow specific subnet to access single URL directory

Dears,

 

Can some1 help me write the following Irule :

 

The target of it is let "rackspace" access specific URL while all others can have full access to all URLs including this one

 

when HTTP_REQUEST { if { ([string tolower [HTTP::path]] equals ";) && ([class match [IP::client_addr] equals "rackspace"]) } { permit }

 

}

 

1 Reply

  • I'd probably do something like this.. I haven't tested it but should give you some ideas

    when HTTP_REQUEST { 
        set url "https://prodfmw-osb.bm.com.lb/cvs/chn.website.cvs.Account_1.0"
        if {[class match [IP::client_addr] equals "rackspace"] } {
            if { not [string tolower [HTTP::path]] equals $url} {
                drop
            }
        }
    }