Forum Discussion

Svevak_211593's avatar
Svevak_211593
Icon for Nimbostratus rankNimbostratus
Oct 23, 2015

irule access for defined IP/client

Hello,

 

I want to write an iRule to allow only one defined IP and one client-group access to one defined url.

 

My code looks like this:

 

when HTTP_REQUEST {

if { ([HTTP::host] equals "cname.sport.net")}{
           if { [class match [IP::client_addr] equals "datagroup-xxx"] or [class-match [IP::client_addr] equals "xxx.xxx.xxx.xxx"] }{
               pool sport-http-pool
               persist none
              }
   else {
       drop
       }
   }
}

I get this error: 01070151:3: Rule [/Common/irule-test-http] error: /Common/irule-test-http:4: error: [undefined procedure: class-match][class-match [IP::client_addr] equals "xxx.xxx.xxx.xxx"]

 

Can anybody help me?

 

2 Replies

  • Think I solved it....

    when HTTP_REQUEST {
    
    if { ([HTTP::host] equals "cname.sport.net")}{
               if { [class match [IP::client_addr] equals "datagroup-xxx"] or [IP::addr [IP::client_addr] equals "xxx.xxx.xxx.xxx"] }{
                   pool sport-http-pool
                   persist none
                  }
       else {
           drop
       }
    

    } }