Skip to main content
Matt_L
Staff
Staff
February 24, 2026

Technical Tip: How to customize FortiGate protocol options for applications that use non-standard ports

  • February 24, 2026
  • 0 replies
  • 274 views
Description This article explains how to customize FortiGate protocol options using the GUI and CLI if applications that need to be inspected are using non-standard ports.
Scope All supported versions of FortiOS.
Solution

Note: For the purpose of this article, the SMTP port will be changed to a non-standard TCP port of 2525.

 

Below are the necessary configuration steps if using the FortiGate GUI:

 

Go to Policy & Objects -> Protocol Options and select 'Create New'. (The default profile is read only.)

 

protocol-options_create-new.png

 

On the 'New Protocol Options' page, enter a name for the new profile in the 'Name' field, and add any comments in the 'Comments' field if required. For the purpose of this article, the new profile will be named 'Test', and a comment of 'Change SMTP port to 2525' will be entered.

 

New-Profile.png

 

In the 'Protocol Port Mapping' section, in the port field for the 'SMTP' protocol, change the port from the standard port of '25' to the non-standard port of '2525' and select 'OK' to save the change.

 

port-change-to-2525.png

 

Note: For the change to take effect, the newly created Protocol Options profile will need to be configured on a firewall policy:

 

Go to Policy & Objects -> Firewall Policy and either edit an existing firewall policy or create a new one, and in the 'Firewall/Network Options' section, click in the field next to 'Protocol Options' and select the newly created profile from the drop-down list and select 'OK' to save the change.

 

select-new-profile-in-policy.png


Below are the necessary configuration commands to create the new protocol options profile if using the FortiGate CLI:

 

Note: Protocol Options are VDOM specific so ensure that the configuration is performed in the required VDOM if VDOMs are enabled.

 

config vdom
    edit root
        config firewall profile-protocol-options
            edit Test

                config smtp
                    set ports 2525
                end
            next

        end

    next

end

 

The following are the necessary configuration commands to add the newly created protocol options profile to a firewall policy if using the FortiGate CLI:

 

config vdom
    edit root
        config firewall policy
            edit 9
                set profile-protocol-options Test

                    next
        end

    next

end