relate_client

Description

Sets up a related established connection. This can be used with protocols that parse information out of a control connection and then establish a data connection based on information that was exchanged in the control connection.

Syntax

relate_client {
    proto <ip_proto>
    clientflow <vlan> <local_addr> <local_port> <rmt_addr> <rmt_port>
    serverflow <vlan> <local_addr> <local_port> <rmt_addr> <rmt_port>
}

relate_client { proto <ip_proto> clientflow <vlan> <local_addr> <local_port> <rmt_addr> <rmt_port> serverflow <vlan> <local_addr> <local_port> <rmt_addr> <rmt_port> }

  • Sets up a related established connection.

Examples

Below example show how to create GRE related flow for virtual intercepting PPTP traffic

ltm rule PPTP-IRULE {
    when CLIENT_ACCEPTED priority 300 {
      set client_vlan [LINK::vlan_id]
   }

when SERVER_CONNECTED {
    set server_vlan [LINK::vlan_id]
        # prepare for GRE
    relate_client {
        proto 47
        clientflow $client_vlan [IP::server_addr] 0 [IP::client_addr] 0
        serverflow $server_vlan [IP::local_addr]  0 [IP::server_addr] 0
    }
    log local0.debug "Creating a listener with the following command:"
    log local0.debug "relate_client \{"
    log local0.debug "\tproto 47"
    log local0.debug "\tclientflow $client_vlan [IP::server_addr] 0 [IP::client_addr] 0"
    log local0.debug "\tserverflow $server_vlan [IP::local_addr]  0 [IP::server_addr] 0"
    log local0.debug "\}"
    log local0.debug "Connection Table Should Look Like: [IP::client_addr]:any  [IP::server_addr]:any  [IP::local_addr]:any [IP::server_addr]:any  gre  1  \(tmm: X\)  none"

    after 100 {}

    unset client_vlan server_vlan
}
}


ltm virtual Default-Forwarding-PPTP-1723 {
    destination 0.0.0.0:pptp
    ip-forward
    ip-protocol tcp
    mask any
    profiles {
        fastL4 { }
    }
    rules {
        PPTP-IRULE
    }
    source 0.0.0.0/0
    translate-address disabled
    translate-port disabled
    vlans {
        internet_vlan
        subscriber_vlan
    }
    vlans-enabled
    vs-index 14
}