Fortinet white logo
Fortinet white logo

Script Reference Guide

IP commands

IP commands

  • IP:client_addr() — Returns the client IP address of a connection. For the frontend, this refers to the source address; for the backend, this refers to the destination address.

  • IP:server_addr() — Returns the IP address of the server in the backend.

  • IP:local_addr() — For the frontend, this returns the IP address of the virtual server that the client is connected to. For the backend, this returns the incoming interface IP address of the return packet.

  • IP:remote_addr() — Returns the IP address of the host on the far end of the connection.

  • IP:client_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 of the gateway used to connect.

  • IP:server_port() — Returns the server port number, which is the real server port.

  • 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 of the gateway used to connect.

  • IP:remote_port() — Returns the remote port number. In the frontend, the remote port is the client port. In the backend, the remote port is the real server port.

  • IP:client_ip_ver() — Returns the current client IP version number of the connection, either 4 or 6.

  • IP:server_ip_ver() — Returns the current server IP version number of the connection, either 4 or 6.

IP commands

IP commands

  • IP:client_addr() — Returns the client IP address of a connection. For the frontend, this refers to the source address; for the backend, this refers to the destination address.

  • IP:server_addr() — Returns the IP address of the server in the backend.

  • IP:local_addr() — For the frontend, this returns the IP address of the virtual server that the client is connected to. For the backend, this returns the incoming interface IP address of the return packet.

  • IP:remote_addr() — Returns the IP address of the host on the far end of the connection.

  • IP:client_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 of the gateway used to connect.

  • IP:server_port() — Returns the server port number, which is the real server port.

  • 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 of the gateway used to connect.

  • IP:remote_port() — Returns the remote port number. In the frontend, the remote port is the client port. In the backend, the remote port is the real server port.

  • IP:client_ip_ver() — Returns the current client IP version number of the connection, either 4 or 6.

  • IP:server_ip_ver() — Returns the current server IP version number of the connection, either 4 or 6.