Skip to main content
jasri
Staff
Staff
June 20, 2018

Technical Tip: How to insert special symbol '?' in the FortiOS CLI

  • June 20, 2018
  • 0 replies
  • 3993 views

Description

 

This article describes how to insert the special symbol '?' in the CLI as part of the input. In the FortiOS CLI, '?' is usually used to open the help menu, but under certain circumstances it can be used as part of the input, for example, to configure a redirect URL containing a '?' in a firewall policy.

 

Scope

 

FortiGate.

Solution


To use the special symbol '?' as part of the input in the CLI, press 'CTRL+V' or 'Ctrl + Shift + -' on the keyboard first, then press '?'.

This is how to configure a redirect firewall policy to use a URL with a '?':

 

config firewall policy
    edit 1   
        set name "test"
        set uuid 9454cdf2-4923-51e8-336f-123d6b6ab6b5
        set srcintf "port2"
        set dstintf "port1"
        set srcaddr "all"
        set dstaddr "all"
        set action accept
        set schedule "always"
        set service "ALL"
        set logtraffic all
        set groups "Local"
        set nat enable
        set redirect-url "http://abc.com/test?=123"
    next
end

 

Note that copying and pasting the entire redirect-url will not work, it is absolutely necessary to input 'CTRL+V' or 'Ctrl + Shift + -' first before using the '?' symbol.

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.