Forum Discussion

Ed_Adams_76803's avatar
Ed_Adams_76803
Icon for Nimbostratus rankNimbostratus
Nov 24, 2015

Use non-standard port in request to determine pool

How can I take the non-standard port on an HTTP request and use it to send a redirect to 443 and then direct it to the non-standard pool for that particular port?

 

Here is what I have currently:

 

A VIP for port 80 clients uses a general http-https redirect. A VIP for port 443 uses a port 80 pool.

 

That works fine.

 

Now, how can I incorporate the port 81 clients? They need a 81-https redirect. Can the same VIP for port 443 be configured with an irule to send to a port 81 pool or 82 pool or 80 pool, etc?

 

Thanks.

 

3 Replies

  • In your 81-https redirect vs, you will have to redirect to something specific like

     

    Then in your existing vs_ip, you can associate either a traffic policy or an irule which evaluates the URI part of the request and whenever it matches your "specific_uri" then you select the desired pool.

     

  • Can you provide an example on how to write that type of an irule?

     

    So, when a client connects to the virtual server on port 81, 82, 83, etc... I want to send a redirect to 443 and then have that client connect to the correct pool on the matched port (81, 82, 83).

     

    Thank you.

     

  • If clients are using non standard ports such as 81, 82, 83, etc... I would suggest just having them run HTTPS over those ports so you don't have to worry about port translation or having to send something in your redirect that the client will have to present back for the pool selection like a query parameter.