Forum Discussion

kridsana's avatar
Icon for Cirrocumulus rankCirrocumulus
Nov 10, 2022

Is there Limitation of irule "virtual".. can we do it like this?


We have BIG-IQ and BIG-IP AWAF.

I see that BIG-IQ application dashboard is show only 1 application per virtual server.
But in BIG-IP AWAF.. we config it as 1 virtual server 100 application (multi domain vip+use irule to check host header and send it to specific pool and choose specific waf policy)

So we can't see each application metric in BIG-IQ.... This is our issue.

I understand we need to config each vip for each application so BIG-IQ can retrive data from each vip per application but we can't use that many public ip.

So I found that we have irule "virtual" which can send traffic to another virtual server.
Can we do it like this?
Instead of
if {[HTTP::host] equals ""} {
ASM::enable /Common/ >>>> choose pool and waf policy by host header
pool /External/

Change to
if {[HTTP::host] equals ""} {
virtual >>> send it to private ip virtual server by host header which craete a new.

and in virtual server we use private ip and assign pool and waf policy normally
so we can add in BIG-IQ application dashboard and see metric per application.

But is there any limitation on how to use irule "virtual" like this? Is this practical?

3 Replies

  • yep, this is a common scenario and works great. I'm not sure about a top-end limitation, you'd need to test. But with the iRule, if there more than a handful of hosts/policies, I'd recommend a data-group to map host header->virtual so you can keep the iRule logic light. Something like:

    when HTTP_REQUEST {
      set vip_target [class match -value -- [HTTP::host] equals host2vipmap_dg]
      if {$vip_target ne ""} {
        virtual $vip_target
      } else { reject }

     with a data-group set up like:

    ltm data-group internal host2vipmap_dg {
        records {
        type string
    • kridsana's avatar
      Icon for Cirrocumulus rankCirrocumulus

      Thank you for answer JRahm

      May I've another question.. We perform ssl bridging on F5 AWAF (VIP port 443 and pool port 443.. decrypt to scan waf and reencrypt again)

      when I use irule "virtual".. Do I need to reencypt before send it to VS_private ?
      Flow will be like 
      Client > VIP:443 > Decrypt > irule send to virtual > (1) what port I need to use on Virtual private ?  is it 80?

      if it port 80.. So I need to config Virtual_Private to use port 80 with only serverssl profile to re-encrypt it to 443 before send to server , am I correct?
      I'm concern about multiple decrypt/encrypt which might affect latency

      • JRahm's avatar
        Icon for Admin rankAdmin

        your thought there is correct, you don't want to re-encrypt between the virtual servers on the same backplane. Decrypt on the front-end virtual server with a clientssl profile, re-encrypt on the back-end virtual servers with a serverssl profile.