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

Johan_Lindroth's avatar
Johan_Lindroth
Icon for Nimbostratus rankNimbostratus
Sep 18, 2014

help with iRule

Hi folks, I'm trying to create an iRule that should handle a couple of things but I'm not sure how to manage this so I hope you can help me out.

 

  1. The iRule should block all traffic that has a payload over 10mb
  2. Traffic from a specific IP should go to a specific pool/member
  3. If the source address is "test.test.test" AND content has caller/test it should go to a specific pool/member
  4. all other traffic should go to a specific pool/member

I've been creating simple iRules for a while and I think that this is quite simple as well but I can't figure it out

 

3 Replies

  • Hello,

    I can help you with number 2, as I have recently implemented something similar:

    when CLIENT_ACCEPTED {
    
      if { [IP::addr [IP::client_addr] equals 1.1.1.1] }   {
      pool abc.example.com_Pool
        }
    }
    

    You can also use standard slash format for subnets:

    [IP::addr [IP::client_addr] equals 1.1.1.0/24]

    Regards

    Mariusz

  • I can somewhat assume that the "content" is actual HTTP payload, perhaps via POST request? But the source is going to be an IP address, not "test.com", unless you intend to also do a reverse DNS lookup of the client source.