Have some code. Share some code.
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Problem this snippet solves:

Creates an HTTP virtual server referencing an iRule which redirects all requests to HTTPS, a default SNAT automap, and an HTTPS virtual server referencing a pool with a basic monitor, a basic TCP profile, a cookie insert persistence profile, a customized HTTP profile with compression & caching, and a generic clientssl profile.

Product/Version Details

How to use this snippet:

  • Replace the destination variable value in the "@define @..._virtual" lines with the desired address of the virtual server.
  • Replace the members variable value in the "@define @members" line with the list of actual pool members providing the service.
  • Optional: Customize the monitor profile settings to provide the level of monitoring appropriate for your environment.
  • Optional: Customize the clientSSL profile settings to include the appropriate SSL certificate for the service.
  • Optional: Customize the HTTP profile settings as required to support the service in your environment.
  • Optional: Customize the persistence profile settings as required to support the service in your environment.
  • Optional: Customize the TCP profile settings as required to support the service in your environment.

Code :

@name "Sharepoint07-SSL-config"
@description "Sharepoint 7 SSL Configuration"
@published yes
@require_verify yes
@allow_persist yes
@define @members description "SPS Pool Members" editable visible default ""
@define @sps_virtual description "SPS HTTP Virtual" editable visible default ""
@define @sps_https_virtual description "SPS HTTPS Virtual" editable visible default ""

#F5[Local Traffic / SNAT]
snat DefaultSNAT {
   origins default inet

#F5[Local Traffic / Monitor]
monitor SPSHTTP_monitor {
   defaults from http
   interval 30
   timeout 91

#F5[Local Traffic / Profiles / ClientSSL]
profile clientssl SPS_clientssl {
   defaults from clientssl

#F5[Local Traffic / Profiles / HTTP]
profile http SPS_HTTP_opt {
   defaults from http-wan-optimized-compression-caching
   compress keep accept encoding enable
   redirect rewrite matching
   compress content type include
   compress content type exclude none
   ramcache uri exclude none
   ramcache uri include "/_layouts/images/*"
   ramcache uri pinned none

#F5[Local Traffic / Profiles / Persist]
profile persist SPSCookie {
   defaults from cookie
   mode cookie

#F5[Local Traffic / Profiles / TCP]
profile tcp SPS_TCP_opt {
   defaults from tcp-lan-optimized

#F5[Local Traffic / Pool]
pool SPSServers {
   lb method least conn
   monitor all SPSHTTP_monitor

#F5[Local Traffic / Rule]
rule SPS_httptohttps {
   when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]

#F5[Local Traffic / Virtual Server]
virtual SPS_virtual {
   destination @sps_virtual
   ip protocol tcp
   rules SPS_httptohttps

#F5[Local Traffic / Virtual Server]
virtual SPS_httpsvirtual {
   pool SPSServers
   destination @sps_https_virtual
   ip protocol tcp
   persist SPSCookie
Version history
Last update:
‎12-Mar-2015 15:54
Updated by: