Version notice:
SERVER_CONNECTED¶
Description¶
When a fastL4 profile is used on an attached Virtual Server, this iRule event is raised on the emission of the first segment of the server-side flow (e.g., when the TCP SYN segment is sent toward a pool member, or on the first server-side UDP segment). When the Virtual Server is in full-proxy mode (e.g., when a Standard Virtual Server is used), this event is raised on the emission of the first segment for connectionless L4 protocols (e.g., UDP), or on the completion of connection setup for connection-oriented L4 protocols. For TCP, for example, this occurs when the three-way handshake is completed with the target pool member.
Examples¶
when SERVER_CONNECTED {
log local0. "FTP connection from[IP::client_addr]:[TCP::client_port]. \
Mapped to [serverside {IP::local_addr}]:[serverside {TCP::local_port}] \
-> [IP::server_addr]:[serverside {TCP::remote_port}]"
}
Related Information¶
Available Commands:
- clone - Causes the system to clone traffic to the specified pool or pool member regardless of monitor status.
- forward - Sets the connection to forward IP packets.
- HTTP::header - Queries or modifies HTTP headers.
- HTTP::path - Returns or sets the path part of the HTTP request.
- HTTP::query - Returns the query part of the HTTP request.
- HTTP::uri - Returns or sets the URI part of the HTTP request.
- HTTP::version - Returns or sets the HTTP version of the request or response.
- IP::client_addr - Returns the client IP address of a connection
- IP::idle_timeout - Returns or sets the idle timeout value.
- IP::local_addr - Returns the IP address of the virtual server the client is connected to or the self-ip LTM is connected from.
- IP::server_addr - Returns the server’s IP address.
- ip_ttl - Returns the TTL of the latest IP packet received.
- lasthop - Sets the lasthop of an IP connection.
- listen - Sets up a related ephemeral listener to allow an incoming related connection to be established.
- nexthop - Sets the nexthop of an IP connection.
- node - Sends the packet directly to the identified server node.
- peer - Causes the specified iRule commands to be evaluated under the peer’s (opposite) context.
- persist - Causes the system to use the named persistence type to persist the connection.
- session - Utilizes the persistence table to store arbitrary information based on the same keys as persistence.
- snat - Causes the LTM system to assign the specified translation address to the current connection.
- TCP::bandwidth - Returns a bandwidth estimate for the peer.
- TCP::client_port - Returns the remote TCP port/service number of the clientside TCP connection.
- TCP::close - Closes the TCP connection.
- TCP::collect - Collects the specified amount of content data.
- TCP::local_port - Returns the local TCP port/service number of a TCP connection.
- TCP::mss - Returns the on-wire Maximum Segment Size (MSS) for a TCP connection.
- TCP::nagle - Enables or disables the Nagle algorithm on the current TCP connection.
- TCP::notify - Causes the USER_REQUEST or USER_RESPONSE event to be raised.
- TCP::offset - Returns the number of bytes currently held in memory via TCP::collect.
- TCP::option - Gets or sets the value of the specified option kind from the TCP header.
- TCP::payload - Returns or replaces TCP data content.
- TCP::release - Releases and flushes collected data. and resumes processing.
- TCP::remote_port - Returns the remote TCP port/service number of a TCP connection.
- TCP::respond - Sends the specified data directly to the peer.
- TCP::rtt - Returns the smoothed round-trip time estimate for a TCP connection.
- TCP::server_port - Returns the remote TCP port/service number of the serverside TCP connection.
- TCP::unused_port - Returns an unused TCP port for the specified IP tuple.
- UDP::client_port - Returns the UDP port/service number of a client system.
- UDP::drop - Drops the current UDP packet without removing the flow from the connection table
- UDP::local_port - Returns the local UDP port/service number.
- UDP::mss - Returns the on-wire Maximum Segment Size (MSS) for a UDP connection.
- UDP::payload - Returns the content or length of the current UDP payload.
- UDP::remote_port - Returns the remote UDP port/service number.
- UDP::respond - Sends data directly to a peer.
- UDP::server_port - Returns the UDP port/service number of a server system.
- UDP::unused_port - Returns an unused UDP port for the specified IP tuple.
Warning
The links to the sample code below are remnants of the old DevCentral wiki and will result in a 404 error. For best results, please copy the link text and search the codeshare directly on DevCentral.
Sample Code:
- FTP proxy v10 and up - An FTP proxy that simulates FTP proxies found on Bluecoat and Cisco Ironport Proxies
- FTP Session Logging - Log FTP connection and username information
- HTTP Proxy Encapsulator v10/v11 - Allows certain applications to use the HTTP proxy which normally otherwise do not have way to point to the proxy
- iRule_for_passive_ftps_in_ccc_mode - When using ftps with ccc-mode (clear command channel) the ftp-profile on LT…
- LDAP Proxy - An LDAP proxy used send read/write requests to different pools.
- Log Http Tcp Udp To Syslogng - You can use iRules to log a summary of each request and its response. and send the data to a remote syslog server using BIG-IP’s syslog-ng daemon.
- Log Tcp And Http Request Response Info Remotely - Log TCP and HTTP request and response details remotely via High Speed Logging
- MySQL Proxy - An MySQL proxy used send read/write requests to different pools.
- ProxyPass v10/v11 - iRule (for LTM v10/v11) to replace the functionality of Apache Webserver ProxyPass and ProxyPassReverse functions allowing for a different server and client view of your web application(s).
- RADIUS Load Balancing - An iRule to load balance RADIUS requests.
- Select pool member based on HTTP query string parameter - Allow clients to manually select a pool member based on a parameter set in the HTTP query string. with persistence.
- SMTP Start TLS - allows either clear text or TLS encrypted communication with SMTP protocol
- SMTP Proxy - This iRule implements a simple SMTP proxy.
- SMTPStartTLS - This iRule allows either clear text or TLS encrypted communication with the LTM initiating the encryption process if it sees the appropriate “starttls” command in the SMTP communication.
- SOCKS5 SSL Persistence - Much requested 2005 iRule contest winner (thanks Adam!)
- Introduced: BIGIP-9.0.0
The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.