Version notice:
CLIENT_CLOSED¶
Description¶
An iRule event triggered at the end of any client
connection, regardless of protocol.
Examples¶
when CLIENT_CLOSED {
if { [info exists ::active_clients($client_ip)] } {
incr ::active_clients($client_ip) -1
if { $::active_clients($client_ip) <= 0 } {
unset ::active_clients($client_ip)
}
}
}
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.
- 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_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.
- 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::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:
- HTTP Session Limit - Limits total concurrent HTTP sessions to a pre-defined threshhold. allowing those clients with a session cookie to continue once the limit is reached. while redirecting new clients until con…
- Hunt The Wumpus - For all you “Hunt the Wumpus” fans out there. here’s an iRule clone implemented on top of the FTP protocol.
- Limit Connections From Client - Limit the number of TCP connections to a virtual server from client IP addresses.
- 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.
- SMTP Proxy - This iRule implements a simple SMTP proxy.
- SSL renegotiation DOS mitigation - An example to mitigate SSL renegotiation DOS attacks
- Virtual server connection limit with HTTP response - This rule allows administrators to configure a maximum TCP connection limit…
- 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.