Fortinet white logo
Fortinet white logo

CLI Reference

config router policy

config router policy

Description: Configure router policies.

config route policy

edit <name>

set input-device <name1>

set srcaddr <name1>

set dstaddr <name1>

set service <name1>, <name2>, …

set *target <name1>

set status [enable | disable]

set comment {string}

unset

next

show

abort

end

delete <name>

purge

move <name1> [before | after] <name2>

show

end

Sample command:

FX201E5919000057 (policy) # show
config router policy
    edit 1
        set input-device lan
        set srcaddr all
        set dstaddr all
        set service ALL
        set target target.lte1
        set status enable
        set comment this is a test policy
    next
end
Parameter Description Type Size Default
input-device Incoming interface name. option - none
Option Description
lan LAN as the input device.
lo Loopback as the input device.
lte1 LTE 1 as the input device.
wan WAN as the input device.
port4 Port 4 as the input device.
port1 Port 1 as the input device.
srcaddr Source address. option - none
Option Description
lan LAN network address.
all All the network addresses.
none None of the network addresses.
dstaddr destination address. option - none
Option Description
lan LAN network address.
all All the network addresses.
none None of the network addresses.
service Service/service group names. option - none
Option Description
ALL_ICMP ICMP.
ALL All.
etc Refer to the different services in this command.

target

The PBR's out-going interface and next-hop.

option

-

none

Option Description
target.lan LAN as the target.
target.lo Loopback as the target.
target.lte1 LTE 1 as the target.
target.wan WAN as the target.
target.port4 Port 4 as the target.
target.Port1 Port 1 as the target.

status

Status of the policy based the routing rule.

option

-

enable

Option Description
enable Enable the policy.
disable Disable the policy.

comment

Comment on the policy.

string

1 - 255 characters in length

none

config router policy

config router policy

Description: Configure router policies.

config route policy

edit <name>

set input-device <name1>

set srcaddr <name1>

set dstaddr <name1>

set service <name1>, <name2>, …

set *target <name1>

set status [enable | disable]

set comment {string}

unset

next

show

abort

end

delete <name>

purge

move <name1> [before | after] <name2>

show

end

Sample command:

FX201E5919000057 (policy) # show
config router policy
    edit 1
        set input-device lan
        set srcaddr all
        set dstaddr all
        set service ALL
        set target target.lte1
        set status enable
        set comment this is a test policy
    next
end
Parameter Description Type Size Default
input-device Incoming interface name. option - none
Option Description
lan LAN as the input device.
lo Loopback as the input device.
lte1 LTE 1 as the input device.
wan WAN as the input device.
port4 Port 4 as the input device.
port1 Port 1 as the input device.
srcaddr Source address. option - none
Option Description
lan LAN network address.
all All the network addresses.
none None of the network addresses.
dstaddr destination address. option - none
Option Description
lan LAN network address.
all All the network addresses.
none None of the network addresses.
service Service/service group names. option - none
Option Description
ALL_ICMP ICMP.
ALL All.
etc Refer to the different services in this command.

target

The PBR's out-going interface and next-hop.

option

-

none

Option Description
target.lan LAN as the target.
target.lo Loopback as the target.
target.lte1 LTE 1 as the target.
target.wan WAN as the target.
target.port4 Port 4 as the target.
target.Port1 Port 1 as the target.

status

Status of the policy based the routing rule.

option

-

enable

Option Description
enable Enable the policy.
disable Disable the policy.

comment

Comment on the policy.

string

1 - 255 characters in length

none