For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

dan02_161715's avatar
dan02_161715
Icon for Nimbostratus rankNimbostratus
Jul 02, 2014

iRule of HTTP::header insert with class match

I have an iRule set so: when HTTP_REQUEST { HTTP::header insert CLIENT_IP_ADDRESS [IP::client_addr] }

 

I need that when obtain the IP make a matchclass to validate whether this within the group, if this allows, if not this send a drop. How can I do this?

 

1 Reply

  • Try this:

    when CLIENT_ACCEPTED {
        if { not ( [class match [IP::client_addr] equals my_allow_list] ) } {
            drop
        } 
    }
    when HTTP_REQUEST {
        HTTP::header insert CLIENT_IP_ADDRESS [IP::client_addr]
    }
    

    where "my_allow_list" is an address-based data group.