Forum Discussion

Ellison_Zhang_2's avatar
Ellison_Zhang_2
Icon for Nimbostratus rankNimbostratus
May 26, 2017

How to enable WebSocket in BigIP LTM V12.1

Hi experts, Is there any step by step on how to enable websocket in BigIP LTM V12.1? we have HTTP/HTTPs on VIP. Now we want WS/WSS enabled for the same VIP. How can I archive it.

current conf:

ltm virtual vs1_http {
description "vs1 HTTP vip"
destination 10.10.1.1:http
ip-protocol tcp
mask 255.255.255.255
partition common
persist {
    vs1_cookie {
        default yes
    }
}
pool vs1_pool
profiles {
    /Common/tcp { }
    vs1_http { }
}
rules {
    /Common/_sys_https_redirect
}
source 0.0.0.0/0
source-address-translation {
    type automap
}
translate-address enabled
translate-port enabled
vs-index 1565
}



ltm virtual vs1_https {
description "vs1 HTTPS vip"
destination 10.10.1.1:https
ip-protocol tcp
mask 255.255.255.255
partition common
persist {
    vs1_cookie {
        default yes
    }
}
pool vs1_pool
profiles {
    /Common/tcp { }
    vs1_https { }
    vs1_https_clientssl {
        context clientside
    }
}
rules {
    vs1_sslsessionid-inject
}
source 0.0.0.0/0
source-address-translation {
    type automap
}
translate-address enabled
translate-port enabled
vs-index 1564
}

4 Replies

  • Anesh's avatar
    Anesh
    Icon for Cirrostratus rankCirrostratus

    Web Socket connections should be enabled by default based on the profiles used on the VIP .You can also refer K14754 for more information

     

  • Anesh's avatar
    Anesh
    Icon for Cirrostratus rankCirrostratus

    Try the below iRule in vs1_http

    when HTTP_REQUEST {
      if { [string tolower [HTTP::header Upgrade]] contains "websocket" }{
          HTTP::disable
    }
    }
    
  • @Ellison, did you got backend node response 101 instead of 302. If so could you please provide the solution you used.

     

  • brogan_115804's avatar
    brogan_115804
    Historic F5 Account

    The /Common/_sys_https_redirect iRule is causing the BIG-IP itself to respond with 302 redirect (to the same URL on HTTPS).