IP:local_port()
Returns the local port number. In the frontend, the local port is the virtual server port. In the backend, the local port is the port used to connect to the gateway.
Syntax
sp=IP:local_port()
Arguments
N/A
Events
Applicable in all events except VS_LISTENER_BIND and SERVER_BEFORE_CONNECT.
Example
when SERVERSSL_HANDSHAKE {
cip=IP:client_addr()
lip=IP:local_addr()
sip=IP:server_addr()
rip=IP:remote_addr()
cp=IP:client_port()
lp=IP:local_port()
sp=IP:server_port()
rp=IP:remote_port()
sipv=IP:server_ip_ver();
cipv=IP:client_ip_ver();
debug("in server ssl with remote addr %s:%s client %s:%s, local %s:%s, server %s:%s, ip version %s:%s\n", rip, rp, cip, cp, lip,lp, sip, sp, sipv, cipv)
}}
Supported Version
FortiADC version 5.0.x and later.