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

D__Yutzy_151141's avatar
D__Yutzy_151141
Icon for Nimbostratus rankNimbostratus
Apr 16, 2014

Routing external traffic to internal, multiple domains, URL's, old version of F5

We are using an older version of F5 (9.4.x) and my internal team is struggling with an iRule

 

High Level Architecture: Web Tier: F5 -> Reverse Proxy x2 (Apache mod_proxy, load balanced) -> App Tier: F5 -> ...App Servers

 

  • We have branded a new site called xyz.com and xyzs.com, both pointing to the same VIP externally
  • SSL is terminated at external F5
  • http (80) traffic is redirected to https (443)
  • All traffic is then passed to the reverse proxies in Web Tier
  • RP then proxies to an internal URL (xyz.net) on App Tier F5
  • App Tier F5 then routes to app servers

This all works fine. What our internal team is struggling with is the iRule code to do the following:

 

  • qa1.xyz.com, qa2.xyz.com, qa3.xyz.com all come in through the external F5 on a single VIP
  • Get routed through RP to qa1.xyz.net, qa2.xyz.net, qa3.xyz.net
  • App Tier F5 has a single VIP setup to receive all of the qa1 thru qa3.xyz.net traffic

What the team is struggling with is what does the iRule code look like to send:

 

  • qa1.xyz.net to App Server 1
  • qa2.xyz.net to App Server 2
  • qa3.xyz.net to App Server 3

Any feedback or suggestions to help us get off-stuck is greatly appreciated!

 

1 Reply

  • You could create separate pools for the servers and use something like this:

    when HTTP_REQUEST {
            switch -glob [string tolower [http_host]] {
                "qa1.xyz.net" {
                    pool qa1
                }
                "qa2.xyz.net" {
                    pool qa2
                }
                "qa3.xyz.net" {
                    pool qa3
                }
                default {
                    pool default_pool
                }
            }
        }
    

    ...Doug