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

Gio_129629's avatar
Gio_129629
Icon for Nimbostratus rankNimbostratus
Dec 16, 2014

switch host different VIP port

hello guys, I ask you to support the configuration of an iRule. I have a VIP on port 8888 to which I would like to associate an iRule that allows me to direct traffic depending on a host of pool rather than on another. the call is via http://url1.domain.com:8888.

 

I tried to configure the following iRule but does not work:

a when HTTP_REQUEST { -glob switch [string tolower [HTTP :: host]] { url1.domain.com {pool Pool1 } url2.domain.com { pool Pool2}

 

}

could you help me?

 

10 Replies

  • I may be missunderstanding the question but based upon what you already have in your iRule maybe something like this is what your looking for:

    when HTTP_REQUEST { 
        switch -glob [string tolower [HTTP::host]] {
            "url1.domain.com" {
                pool Pool1
            }
            "url2.domain.com" {
                pool Pool2
            }
        }
    }
    
  • Unfortunately it seems to me that my iRule not do it just because the vip is specific with port 8888

     

  • I would like to call and the call http://aaa.domain.com:8888 corresponds pool1 http://bbb.domain.com:8888 corresponds pool2

     

  • See that the request is not only in http, but the door 8888 below. Thanks for your support

     

  • Try putting some logging in there so you know which part of iRule is executing for each attempt. If the correct portion of the iRule is executing when you expect it to then maybe it's a natting issue.

     

  • The natt is correct, pass all protocols, try to put the sensors (if I can) but I think the iRule well written intercepts only http traffic is not the 8888

     

  • Hi guys, I've written the irue solved by including the door over the hosts as well: when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "url1.domain.com:8888" { pool Pool1 } "url2.domain.com:8888" { pool Pool2 } } }

     

  • Popped the idea by trying to use a httpclass. Thanks for the moral support &128515;!!!