Fortinet black logo

Admin Guide (Standalone)

Configure protocol/port range

Copy Link
Copy Doc ID 5d87fec9-ac5b-11ec-9fd1-fa163e15d75b:785795
Download PDF

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