CodeShare
Have some code. Share some code.
cancel
Showing results for 
Search instead for 
Did you mean: 

Articles

APM Portal Host Rewrite

Problem this snippet solves:Sometimes it’s not necessary, and even redundant, for a link to an external site to go through the reverse proxy process. In the following iRules, we added the tags apm_do_not_touch, and /apm_do_not_touch to indicate that ...

APM Time Based Cookie

Problem this snippet solves:The iRule allows you to change the APM session based cookie to a Time based cookie. This allow sthe session to stay active even if the user closes the browser. The new time based cookie is set after the user log on to the ...

Apache Style Logging with HSL

Problem this snippet solves:When SNATing to servers, the client IP is lost. This was information our security group and developers wanted to have available, so I created an iRule to use the HSL functionality in BigIP 10 to do that. Without cracking o...

Apache mod_auth_tkt Single Sign On

Problem this snippet solves:This iRule is designed to parse and verify the digest from a auth_tkt cookie. This is a proof-of-concept that can be leveraged to offload authentication and/or verification from the apache servers when used in conjunction ...

Citrix XenApp Secure Access Deployment

Problem this snippet solves: With the combination of BIG-IP Access Policy Manager (APM) and Citrix ""XenApp"", organizations can deliver a complete remote access solution that allows for scalability, security, compliance and flexibility. The followin...

Allow HTTP Explicit Proxy to Handle Short Name Resolution

Problem this snippet solves:In BIG-IP v11.5.1 and up, F5 supports altering connection parameters prior to handling an outgoing explicit proxy connection. This allows you to create either a proxy chain, or manipulate the outgoing request prior to name...

Akamai True-Client-IP Header Persistence

Problem this snippet solves:For customers leveraging Akamai, all traffic is routed through Akamai regional servers. This means using source address persistence will severely limit load distribution. While cookie persistence is an ideal option, persis...

Akamai G20 Header Authentication

Problem this snippet solves:iRule for detection and authentication of Akamai G2O headers. Requires TMOS 11.1 or above as this leverages "CRYPTO::sign". This code block is the basics needed to make a decisions about requests that may or may not conta...

Advanced TFTP Load Balancing

Problem this snippet solves:TFTP works in similar fashion to active FTP, using a callback from a random high port for the data stream: 1. The initiating host A sends a request packet to host B at Well Known Port 69. 2. B replies with a packet sent fr...

Access Control Based On Network or Host

Problem this snippet solves:The iRule allows administrators to allow or deny access to a virtual server based on: source IP address or network destination IP address or network destination portHow to use this snippet:The rule expects the follow...

Access Control Based on IP

Problem this snippet solves:This iRule forwards traffic based on "trusted" source addresses. The original application was to add a layer of security to IP forwarding virtual servers. By default, it will drop traffic unless the source IP is a member...

HTTP Request Queuing for WAM

Problem this snippet solves:We are using WAM on v10.2.4 and wanted to have concurrent requests for the same page objects queued to prevent request stampedes to the backend when a page was freshly published or had expired. Unfortunately this functiona...

Session Limiting

Problem this snippet solves:This iRule limits the amount of sessions. The limits of the Session command in version 9.x forces us to use a global array so we know the count of sessions. There is also a reaper function to ensure that stale sessions don...

Hamish by Cirrocumulus
  • 409 Views
  • 2 comments
  • 0 kudos

Bot and Request Limiting iRule

Problem this snippet solves:This iRule limits robots and what they can do. Furthermore, it restricts requests per second and blacklists a client that goes above the limit Note: Not CMP Compatible.Code :when RULE_INIT { #Define blacklist timeout set...

HTTP Rate Limiting - CMP Compatible

Problem this snippet solves:This iRule is a CMP compatible Request per Second Throttling iRule.Code :when HTTP_REQUEST { set debug 1 set expiration_time 300 set client_ip [IP::client_addr] set req_limit 200 set curr_time [clock seconds] set timekey ...

Cache Manipulation Examples

Problem this snippet solves:One iRule will allow for different cache times in the event that not all objects should be cached at the same rate. Another contains some fixes for Safari back-button issues. And yet another for Movable Type and TypeKey. J...

Remove Whitespace from HTTP Response Payload

Problem this snippet solves:Summary: Strip extraneous white space from HTML in the HTTP response payload Here is a simple iRule which uses a stream filter and STREAM::expression based iRule to two or more consecutive whitespace characters with a spa...

HTTP Pre-Fetch Insertion

Problem this snippet solves:This iRule demonstrate how to use BIG-IP to insert prefetch hint/force to http response from server. "Prefetch hint" is the way that web server tell browser to continue downloading more objects after it finishes current pa...

HTML Comment Scrubber with Stream Profile

Problem this snippet solves:This example uses similar logic to scrub out HTML comments as the Html Comment Scrubber rule. Instead of collecting the HTTP response payloads, it uses the stream filter to replace the strings inline. This should be more e...

HTML Comment Scrubber

Problem this snippet solves:HTML Commenting is very useful for documenting your site content. Unfortunately, that information can sometimes be private and it is not a desired situation to let everyone viewing your website to be able to access those c...

Labels
Top Contributors