Category Archive: F5 LTM

Feb 23

Connection throttling iRule

In some cases there’s a need to introduce rate limiting based on number of connections over period of time. Out of the box F5 allow you to set rate limit based on concurrent connections which is useful option, but not always provide functionality business require.   Solution to this problem can be solved by using …

Continue reading »

Mar 18

How to log all requests with headers and VIP name in F5 LTM

In some cases, especially during troubleshooting it may be useful to create custom logging iRule to log information about requests to specific VIP. Of course you could simply use “Request Logging” profile in LTM, but using iRule will allow you to tag logs so you can find specific requests easier and most importantly log more …

Continue reading »

Aug 21

How to insert HTTP header X-Forwarded-Proto for SSL traffic of F5 LTM

In our scenario we do SSL offload on the load balancer before inserting header for incoming request from client to physical server behind LB. To insert protocol information header you can configure a custom HTTP profile with ‘Request Header Erase’ set to X-Forwarded-Proto and ‘Request Header Insert’ set to ‘X-Forwarded-Proto: https’. This ensures that any …

Continue reading »

Aug 21

How to rewrite HTTP redirect 301 to 302 using iRules on F5 LTM

In this example we going to rewrite HTTP redirect on server response. Assume that client is trying to connect to website which has been moved to different location and as a result Apache or IIS is sending HTTP response code 301 (Permanent Redirect) but we want to change it to code 302 (Temporary Redirect). There …

Continue reading »

Aug 21

iRule – 301 redirect on F5 LTM

In this example we going to redirect HTTP request coming for domain.com to http://www.domain.com using basic iRule. Configuration steps: 1) Login to load balancer’s GUI 2) Go to Local Traffic -> iRules -> iRule List and click Create 3) Assign Name for iRule and paste enter irule code into Definition field. Once done press Finished. …

Continue reading »