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

Problem this snippet solves:

An iRule that allows the sorting of VPN traffic to the various VPN servers on the back end based on negotiation protocol or IP protocol of the tunnel. This rule will require a persistence profile as well. With this rule a company could have the domain name vpn.mycompany.com and have more than one type of VPN server present.

Code :

when CLIENT_ACCEPTED {
        if {[IP::protocol] == 47 || [TCP::local_port] == 1723} {
# GRE used by MS PPTP server, TCP control channel
            pool ms_pptp
           }
        elseif {[IP::protocol] == 50 || [IP::protocol] == 51 || [UDP::local_port] == 500}  {
# AH and ESP used by IPSec, IKE used by IPSec
pool ipsec_pool
           }
        elseif {[IP::protocol] == 115} {
           pool l2tp_pool
# L2TP Protocol server
           }
        }
Version history
Last update:
‎18-Mar-2015 16:23
Updated by:
Contributors