Fortinet white logo
Fortinet white logo

Script Reference Guide

TCP:reject()

TCP:reject()

Allows you to reject a TCP connection from a client.

Syntax

TCP:reject()

Arguments

N/A

Events

Applicable in STREAM_REQUEST_DATA.

Example

when STREAM_REQUEST_DATA { 
    local header = TCP:receive(20) 
    local len = string.byte(string.sub(header, 3, 3)) 

    if (len < 2) then 
        TCP:reject() 
    end 
} 

Supported Version

FortiADC version 6.1.1 and later.

TCP:reject()

TCP:reject()

Allows you to reject a TCP connection from a client.

Syntax

TCP:reject()

Arguments

N/A

Events

Applicable in STREAM_REQUEST_DATA.

Example

when STREAM_REQUEST_DATA { 
    local header = TCP:receive(20) 
    local len = string.byte(string.sub(header, 3, 3)) 

    if (len < 2) then 
        TCP:reject() 
    end 
} 

Supported Version

FortiADC version 6.1.1 and later.