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

Sam10's avatar
Sam10
Icon for Altostratus rankAltostratus
Jun 04, 2019

irule to route traffic to specific pool

we want 2 particular source to access pool B and the remaining traffic to go to poolA.

When all node in poolB fail traffic need to go to default poolA . Please let me know how can i get this working.

1 Reply

  • Hi.

    It this useful?

     

    when HTTP_REQUEST {

      if { [IP::addr [IP::client_addr] equals 192.168.19.80] || [IP::addr [IP::client_addr] equals 192.168.19.29] } {

      log local0. "IP address is [IP::client_addr]"

         if { [active_members pool_B] > 0 } {

          log local0. "pool_B"

        pool pool_B

        } elseif { [active_members pool_A] > 0 } {

        log local0. "pool_A"

        pool pool_A

        }

    }

    }

    }

     

    ltm virtual /Common/VS_http {

      destination /Common/192.168.19.93:80

      ip-protocol tcp

      mask 255.255.255.255

      profiles {

        /Common/http { }

        /Common/tcp { }

      }

      rules {

        /Common/My_rule

      }

      source 0.0.0.0/0

      source-address-translation {

        pool /Common/My_Snat_pool

        type snat

      }

      translate-address enabled

      translate-port enabled

    }