Fortinet white logo
Fortinet white logo

CLI Reference

config phase1-interface

config phase1-interface

Description: Configure the VPN remote gateway.

config ipsec

config phase1-interface

edit <name>

set ike-version [1 | 2]

set keylife [120 – 172800]

set proposal [des-md5 | des-sha1 | des-sha256 | 3des-md5 | 3des-sha1 | 3des-sha256 | aes128-md5 | aes128-sha1 | aes128-sha256 | aes256-md5 | aes256-sha1 | aes256-sha256]

set dhgrp [1 | 2 | 5 | 14]

set *interface <name1>

set type [static | ddns]

set *remote-gw {ipv4-address}

set *remotegw-ddns {string} *available when type is set to ddns

set authmethod [psk | signature]

set *psksecret {string}

set localid {string}

set peerid {string}

set add-gw-route [enable | disable]

set dev-id-notification [enable | disable]

set dev-id <name1> *available when dev-id-notification is enabled

unset

next

show

abort

end

delete <name>

purge

show

end

Sample command:

FX201E5919000057 (phase1-interface) # show
config vpn ipsec phase1-interface
    edit phase1_1
        set ike-version 2
        set keylife 86400
        set proposal aes128-sha256 aes256-sha256 3des-sha256 aes128-sha1 aes256-sha1 3des-sha1
        set dhgrp 14 5
        set interface wan
        set type static
        set remote-gw 207.102.148.196
        set authmethod psk
        set psksecret ******
        set localid 92
        set peerid 22
        set add-gw-route disable
        set dev-id-notification disable
    next
end
Parameter Description Type Size Default
ike-version IKE protocol version. option - 2
Option Description
1 Version 1
2 Version 2
keylife Time to wait in seconds before the phase 1 encryption key expires. integer 120 - 172800 86400
proposal Phase1 proposal. option -

aes128-sha256

aes256-sha256

3des-sha256

aes128-sha1

aes256-sha1

3des-sha1

Option Description
des-md5
des-sha1
des-sha256
3des-md5
3des-sha1
3des-sha256
aes128-md5
aes128-sha1

aes128-sha256

aes256-md5

aes256-sha1

aes256-sha256

dhgrp DH group. option - 14, 5
Option Description
1
2
5
14
interface The outgoing interface. option - none

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

remote-gw

The IPv4 address of the remote gateway's external interface.

IPv4 address

-

none

authmethod

Authentication method.

option

-

psk

Option Description
psk Preshared key.
signature Signature certificate.

psksecret

Pre-shared secret for PSK authentication (ASCII string or hexadecimal encoded with a leading 0x).

string

-

none

localid

Local ID.

string

-

none

peerid

Peer identity.

string

-

none

add-gw-route

Whether to automatically add a route to the remote gateway.

option

-

disable

Option Description
enable Enable automatically adding a route to the remote gateway.
disable Disable automatically adding a route to the remote gateway.

dev-id-notification

Whether to enable device ID notification for the first IKE message.

option

-

disable

Option Description
enable Enable device ID notification.
disable Disable device ID notification.

dev-id

The Device ID carried by the device ID notification.

string

-

none

config phase1-interface

config phase1-interface

Description: Configure the VPN remote gateway.

config ipsec

config phase1-interface

edit <name>

set ike-version [1 | 2]

set keylife [120 – 172800]

set proposal [des-md5 | des-sha1 | des-sha256 | 3des-md5 | 3des-sha1 | 3des-sha256 | aes128-md5 | aes128-sha1 | aes128-sha256 | aes256-md5 | aes256-sha1 | aes256-sha256]

set dhgrp [1 | 2 | 5 | 14]

set *interface <name1>

set type [static | ddns]

set *remote-gw {ipv4-address}

set *remotegw-ddns {string} *available when type is set to ddns

set authmethod [psk | signature]

set *psksecret {string}

set localid {string}

set peerid {string}

set add-gw-route [enable | disable]

set dev-id-notification [enable | disable]

set dev-id <name1> *available when dev-id-notification is enabled

unset

next

show

abort

end

delete <name>

purge

show

end

Sample command:

FX201E5919000057 (phase1-interface) # show
config vpn ipsec phase1-interface
    edit phase1_1
        set ike-version 2
        set keylife 86400
        set proposal aes128-sha256 aes256-sha256 3des-sha256 aes128-sha1 aes256-sha1 3des-sha1
        set dhgrp 14 5
        set interface wan
        set type static
        set remote-gw 207.102.148.196
        set authmethod psk
        set psksecret ******
        set localid 92
        set peerid 22
        set add-gw-route disable
        set dev-id-notification disable
    next
end
Parameter Description Type Size Default
ike-version IKE protocol version. option - 2
Option Description
1 Version 1
2 Version 2
keylife Time to wait in seconds before the phase 1 encryption key expires. integer 120 - 172800 86400
proposal Phase1 proposal. option -

aes128-sha256

aes256-sha256

3des-sha256

aes128-sha1

aes256-sha1

3des-sha1

Option Description
des-md5
des-sha1
des-sha256
3des-md5
3des-sha1
3des-sha256
aes128-md5
aes128-sha1

aes128-sha256

aes256-md5

aes256-sha1

aes256-sha256

dhgrp DH group. option - 14, 5
Option Description
1
2
5
14
interface The outgoing interface. option - none

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

remote-gw

The IPv4 address of the remote gateway's external interface.

IPv4 address

-

none

authmethod

Authentication method.

option

-

psk

Option Description
psk Preshared key.
signature Signature certificate.

psksecret

Pre-shared secret for PSK authentication (ASCII string or hexadecimal encoded with a leading 0x).

string

-

none

localid

Local ID.

string

-

none

peerid

Peer identity.

string

-

none

add-gw-route

Whether to automatically add a route to the remote gateway.

option

-

disable

Option Description
enable Enable automatically adding a route to the remote gateway.
disable Disable automatically adding a route to the remote gateway.

dev-id-notification

Whether to enable device ID notification for the first IKE message.

option

-

disable

Option Description
enable Enable device ID notification.
disable Disable device ID notification.

dev-id

The Device ID carried by the device ID notification.

string

-

none