Fortinet Document Library

Version:

Version:


Table of Contents

Admin Guide (Standalone)

Download PDF
Copy Link

Configure protocol/port range

Use the following commands to specify the network protocols and ports to which you want to apply firewall policies.

CLI command

Description

config network service service-custom

Enters the network service configuration mode.

edit <name>

Specify the name of the service configuration object.

set protocol <Protocol Type>

Specify the protocol (service).

set protocol number <0-255> *

Specify the protocol number (if you are not sure of the name of the protocol).

set protocol udp-portrange

Specify the port range for UDP protocol.

set protocol tcp-portrange

Specify the port range for TCP protocol.

Example protocol/port range configurations:

config network service service-custom

edit service1

set protocol tcp

set tcp-portrange 5000-5555

next

edit service2

set protocol udp

set udp-portrange 6000-6350

next

edit service3

set protocol icmp

next

edit service4

set protocol ip

set protocol-number 47

next

end

Configure protocol/port range

Use the following commands to specify the network protocols and ports to which you want to apply firewall policies.

CLI command

Description

config network service service-custom

Enters the network service configuration mode.

edit <name>

Specify the name of the service configuration object.

set protocol <Protocol Type>

Specify the protocol (service).

set protocol number <0-255> *

Specify the protocol number (if you are not sure of the name of the protocol).

set protocol udp-portrange

Specify the port range for UDP protocol.

set protocol tcp-portrange

Specify the port range for TCP protocol.

Example protocol/port range configurations:

config network service service-custom

edit service1

set protocol tcp

set tcp-portrange 5000-5555

next

edit service2

set protocol udp

set udp-portrange 6000-6350

next

edit service3

set protocol icmp

next

edit service4

set protocol ip

set protocol-number 47

next

end