Fortinet black logo

CLI Reference

config router policy

config router policy

Configure IPv4 routing policies.

config router policy
    Description: Configure IPv4 routing policies.
    edit <seq-num>
        set input-device <name1>, <name2>, ...
        set src <subnet1>, <subnet2>, ...
        set dst <subnet1>, <subnet2>, ...
        set action [deny|permit]
        set protocol {integer}
        set start-port {integer}
        set end-port {integer}
        set start-source-port {integer}
        set end-source-port {integer}
        set gateway {ipv4-address}
        set output-device {string}
        set status [enable|disable]
        set comments {var-string}
    next
end

config router policy

Parameter

Description

Type

Size

Default

input-device <name>

Incoming interface name.

Interface name.

string

Maximum length: 79

src <subnet>

Source IP and mask (x.x.x.x/x).

IP and mask.

string

Maximum length: 79

dst <subnet>

Destination IP and mask (x.x.x.x/x).

IP and mask.

string

Maximum length: 79

action

Action of the policy route.

option

-

permit

Option

Description

deny

Do not search policy route table.

permit

Use this policy route for forwarding.

protocol

Protocol number .

integer

Minimum value: 0 Maximum value: 255

0

start-port

Start destination port number .

integer

Minimum value: 0 Maximum value: 65535

1

end-port

End destination port number .

integer

Minimum value: 0 Maximum value: 65535

65534

start-source-port

Start source port number .

integer

Minimum value: 0 Maximum value: 65535

1

end-source-port

End source port number .

integer

Minimum value: 0 Maximum value: 65535

65534

gateway

IP address of the gateway.

ipv4-address

Not Specified

0.0.0.0

output-device

Outgoing interface name.

string

Maximum length: 35

status

Enable/disable this policy route.

option

-

enable

Option

Description

enable

Enable this policy route.

disable

Disable this policy route.

comments

Optional comments.

var-string

Maximum length: 255

config router policy

Configure IPv4 routing policies.

config router policy
    Description: Configure IPv4 routing policies.
    edit <seq-num>
        set input-device <name1>, <name2>, ...
        set src <subnet1>, <subnet2>, ...
        set dst <subnet1>, <subnet2>, ...
        set action [deny|permit]
        set protocol {integer}
        set start-port {integer}
        set end-port {integer}
        set start-source-port {integer}
        set end-source-port {integer}
        set gateway {ipv4-address}
        set output-device {string}
        set status [enable|disable]
        set comments {var-string}
    next
end

config router policy

Parameter

Description

Type

Size

Default

input-device <name>

Incoming interface name.

Interface name.

string

Maximum length: 79

src <subnet>

Source IP and mask (x.x.x.x/x).

IP and mask.

string

Maximum length: 79

dst <subnet>

Destination IP and mask (x.x.x.x/x).

IP and mask.

string

Maximum length: 79

action

Action of the policy route.

option

-

permit

Option

Description

deny

Do not search policy route table.

permit

Use this policy route for forwarding.

protocol

Protocol number .

integer

Minimum value: 0 Maximum value: 255

0

start-port

Start destination port number .

integer

Minimum value: 0 Maximum value: 65535

1

end-port

End destination port number .

integer

Minimum value: 0 Maximum value: 65535

65534

start-source-port

Start source port number .

integer

Minimum value: 0 Maximum value: 65535

1

end-source-port

End source port number .

integer

Minimum value: 0 Maximum value: 65535

65534

gateway

IP address of the gateway.

ipv4-address

Not Specified

0.0.0.0

output-device

Outgoing interface name.

string

Maximum length: 35

status

Enable/disable this policy route.

option

-

enable

Option

Description

enable

Enable this policy route.

disable

Disable this policy route.

comments

Optional comments.

var-string

Maximum length: 255