Fortinet white logo
Fortinet white logo

CLI Reference

config ssh-filter profile

config ssh-filter profile

SSH filter profile.

config ssh-filter profile
    Description: SSH filter profile.
    edit <name>
        set block {option1}, {option2}, ...
        set default-command-log [enable|disable]
        config file-filter
            Description: File filter.
            config entries
                Description: File filter entries.
                edit <filter>
                    set action [log|block]
                    set comment {var-string}
                    set direction [incoming|outgoing|...]
                    set file-type <name1>, <name2>, ...
                    set password-protected [yes|any]
                next
            end
            set log [enable|disable]
            set scan-archive-contents [enable|disable]
            set status [enable|disable]
        end
        set log {option1}, {option2}, ...
        config shell-commands
            Description: SSH command filter.
            edit <id>
                set action [block|allow]
                set alert [enable|disable]
                set log [enable|disable]
                set pattern {string}
                set severity [low|medium|...]
                set type [simple|regex]
            next
        end
    next
end

config ssh-filter profile

Parameter

Description

Type

Size

block

SSH blocking options.

option

-

Option

Description

x11

X server forwarding.

shell

SSH shell.

exec

SSH execution.

port-forward

Port forwarding.

tun-forward

Tunnel forwarding.

sftp

SFTP.

scp

SCP.

unknown

Unknown channel.

default-command-log

Enable/disable logging unmatched shell commands.

option

-

Option

Description

enable

Enable log unmatched shell commands.

disable

Disable log unmatched shell commands.

log

SSH logging options.

option

-

Option

Description

x11

X server forwarding.

shell

SSH shell.

exec

SSH execution.

port-forward

Port forwarding.

tun-forward

Tunnel forwarding.

sftp

SFTP.

scp

SCP.

unknown

Unknown channel.

name

SSH filter profile name.

string

Maximum length: 35

config file-filter

Parameter

Description

Type

Size

log

Enable/disable file filter logging.

option

-

Option

Description

enable

Enable file filter logging.

disable

Disable file filter logging.

scan-archive-contents

Enable/disable file filter archive contents scan.

option

-

Option

Description

enable

Enable file filter archive contents scan.

disable

Disable file filter archive contents scan.

status

Enable/disable file filter.

option

-

Option

Description

enable

Enable file filter.

disable

Disable file filter.

config entries

Parameter

Description

Type

Size

action

Action taken for matched file.

option

-

Option

Description

log

Allow the content and write a log message.

block

Block the content and write a log message.

comment

Comment.

var-string

Maximum length: 255

direction

Match files transmitted in the session's originating or reply direction.

option

-

Option

Description

incoming

Match files transmitted in the session's originating direction.

outgoing

Match files transmitted in the session's reply direction.

any

Match files transmitted in the session's originating and reply direction.

file-type <name>

Select file type.

File type name.

string

Maximum length: 39

filter

Add a file filter.

string

Maximum length: 35

password-protected

Match password-protected files.

option

-

Option

Description

yes

Match only password-protected files.

any

Match any file.

config shell-commands

Parameter

Description

Type

Size

action

Action to take for URL filter matches.

option

-

Option

Description

block

Block the SSH shell command.

allow

Allow the SSH shell command.

alert

Enable/disable alert.

option

-

Option

Description

enable

Enable alert.

disable

Disable alert.

id

Id.

integer

Minimum value: 0 Maximum value: 4294967295

log

Enable/disable logging.

option

-

Option

Description

enable

Enable logging.

disable

Disable logging.

pattern

SSH shell command pattern.

string

Maximum length: 128

severity

Log severity.

option

-

Option

Description

low

Severity low.

medium

Severity medium.

high

Severity high.

critical

Severity critical.

type

Matching type.

option

-

Option

Description

simple

Match single command.

regex

Match command line using regular expression.

config ssh-filter profile

config ssh-filter profile

SSH filter profile.

config ssh-filter profile
    Description: SSH filter profile.
    edit <name>
        set block {option1}, {option2}, ...
        set default-command-log [enable|disable]
        config file-filter
            Description: File filter.
            config entries
                Description: File filter entries.
                edit <filter>
                    set action [log|block]
                    set comment {var-string}
                    set direction [incoming|outgoing|...]
                    set file-type <name1>, <name2>, ...
                    set password-protected [yes|any]
                next
            end
            set log [enable|disable]
            set scan-archive-contents [enable|disable]
            set status [enable|disable]
        end
        set log {option1}, {option2}, ...
        config shell-commands
            Description: SSH command filter.
            edit <id>
                set action [block|allow]
                set alert [enable|disable]
                set log [enable|disable]
                set pattern {string}
                set severity [low|medium|...]
                set type [simple|regex]
            next
        end
    next
end

config ssh-filter profile

Parameter

Description

Type

Size

block

SSH blocking options.

option

-

Option

Description

x11

X server forwarding.

shell

SSH shell.

exec

SSH execution.

port-forward

Port forwarding.

tun-forward

Tunnel forwarding.

sftp

SFTP.

scp

SCP.

unknown

Unknown channel.

default-command-log

Enable/disable logging unmatched shell commands.

option

-

Option

Description

enable

Enable log unmatched shell commands.

disable

Disable log unmatched shell commands.

log

SSH logging options.

option

-

Option

Description

x11

X server forwarding.

shell

SSH shell.

exec

SSH execution.

port-forward

Port forwarding.

tun-forward

Tunnel forwarding.

sftp

SFTP.

scp

SCP.

unknown

Unknown channel.

name

SSH filter profile name.

string

Maximum length: 35

config file-filter

Parameter

Description

Type

Size

log

Enable/disable file filter logging.

option

-

Option

Description

enable

Enable file filter logging.

disable

Disable file filter logging.

scan-archive-contents

Enable/disable file filter archive contents scan.

option

-

Option

Description

enable

Enable file filter archive contents scan.

disable

Disable file filter archive contents scan.

status

Enable/disable file filter.

option

-

Option

Description

enable

Enable file filter.

disable

Disable file filter.

config entries

Parameter

Description

Type

Size

action

Action taken for matched file.

option

-

Option

Description

log

Allow the content and write a log message.

block

Block the content and write a log message.

comment

Comment.

var-string

Maximum length: 255

direction

Match files transmitted in the session's originating or reply direction.

option

-

Option

Description

incoming

Match files transmitted in the session's originating direction.

outgoing

Match files transmitted in the session's reply direction.

any

Match files transmitted in the session's originating and reply direction.

file-type <name>

Select file type.

File type name.

string

Maximum length: 39

filter

Add a file filter.

string

Maximum length: 35

password-protected

Match password-protected files.

option

-

Option

Description

yes

Match only password-protected files.

any

Match any file.

config shell-commands

Parameter

Description

Type

Size

action

Action to take for URL filter matches.

option

-

Option

Description

block

Block the SSH shell command.

allow

Allow the SSH shell command.

alert

Enable/disable alert.

option

-

Option

Description

enable

Enable alert.

disable

Disable alert.

id

Id.

integer

Minimum value: 0 Maximum value: 4294967295

log

Enable/disable logging.

option

-

Option

Description

enable

Enable logging.

disable

Disable logging.

pattern

SSH shell command pattern.

string

Maximum length: 128

severity

Log severity.

option

-

Option

Description

low

Severity low.

medium

Severity medium.

high

Severity high.

critical

Severity critical.

type

Matching type.

option

-

Option

Description

simple

Match single command.

regex

Match command line using regular expression.