Fortinet black logo

CLI Reference

server-policy service custom

server-policy service custom

Use this command to configure a custom service.

You can add a custom services to a policy to define the protocol and listening port of a virtual server. For details, see server-policy policy.

To use this command, your administrator account’s access control profile must have either w or rw permission to the traroutegrp area. For details, see Permissions.

Syntax

config server-policy service custom

edit "<service_name>"

set port <port_int>

set protocol TCP

next

end

Variable Description Default

"<service_name>"

Enter the name of the new or existing custom network service. The maximum length is 63 characters.

To display the list of existing services, enter:

edit ?

No default.

port <port_int>

Enter the port number on which a virtual server will receive TCP/IP connections for HTTP or HTTPS requests. The valid range is 1–65,535. No default.

Example

This example configures a service definition named SOAP1.

config server-policy service custom

edit "SOAP1"

set port 8081

set protocol TCP

next

end

Related topics

server-policy service custom

Use this command to configure a custom service.

You can add a custom services to a policy to define the protocol and listening port of a virtual server. For details, see server-policy policy.

To use this command, your administrator account’s access control profile must have either w or rw permission to the traroutegrp area. For details, see Permissions.

Syntax

config server-policy service custom

edit "<service_name>"

set port <port_int>

set protocol TCP

next

end

Variable Description Default

"<service_name>"

Enter the name of the new or existing custom network service. The maximum length is 63 characters.

To display the list of existing services, enter:

edit ?

No default.

port <port_int>

Enter the port number on which a virtual server will receive TCP/IP connections for HTTP or HTTPS requests. The valid range is 1–65,535. No default.

Example

This example configures a service definition named SOAP1.

config server-policy service custom

edit "SOAP1"

set port 8081

set protocol TCP

next

end

Related topics