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

VFB's avatar
VFB
Icon for Cirrus rankCirrus
Jul 10, 2018

LB_SELECTED iRule to deny based on source and dest address

Hello, would someone be able to assist with an iRule with LB_SELECTED to deny based on a specific source and destination address? There are multiple source and destination addresses so I was hoping to use switch -glob to accomplish. I'm running version 13.1 so there's no class math I could've used to accomplish this easier. Thanks in advance.

 

4 Replies

  • class match may be too much, as most of the deny statements are /32's

     

  • This is what I was trying to accomplish -

     

    "when LB_SELECTED { switch "[IP::addr [IP::client_addr] equals "170.31.1.1"] and [IP::remote_addr] equals "170.31.1.63" - "[IP::addr [IP::client_addr] equals "170.31.1.10"] and [IP::remote_addr] equals "170.31.1.64"- "[IP::addr [IP::client_addr] equals "170.31.1.11"] and [IP::remote_addr] equals "170.31.1.65" {snat automap}}}"

     

  • class match will be better than a lot of if elseif or switch statements. Easier to manage

     

    I would have a clientside data group and serverside data group if you can separate the lists? I.e. any source matched to any destination.