Fortinet white logo
Fortinet white logo

CLI Reference

7.2.2

config firewall vip

config firewall vip

Configure virtual IP for IPv4.

Syntax

config firewall vip
    edit <name>
        set comment {var-string}
        set extintf {string}
        set extip {user}
        set extport {user}
        set id {integer}
        set mappedip <range1>, <range2>, ...
        set mappedport {user}
        set portforward [disable|enable]
        set portmapping-type [1-to-1|m-to-n]
        set protocol [tcp|udp|...]
        set service <name1>, <name2>, ...
        set type [static-nat|access-proxy]
    next
end

Parameters

Parameter

Description

Type

Size

Default

comment

Comment.

var-string

Maximum length: 255

extintf

Interface connected to the source network that receives the packets that will be forwarded to the destination network.

string

Maximum length: 35

extip

IP address or address range on the external interface that you want to map to an address or address range on the destination network.

user

Not Specified

extport

Incoming port number range that you want to map to a port number range on the destination network.

user

Not Specified

id

Custom defined ID.

integer

Minimum value: 0 Maximum value: 65535

0

mappedip <range>

IP address or address range on the destination network to which the external IP address is mapped.

Mapped IP range.

string

Maximum length: 79

mappedport

Port number range on the destination network to which the external port number range is mapped.

user

Not Specified

name

Virtual IP name.

string

Maximum length: 79

portforward

Enable/disable port forwarding.

option

-

disable

Option

Description

disable

Disable port forward.

enable

Enable port forward.

portmapping-type

Port mapping type.

option

-

1-to-1

Option

Description

1-to-1

One to one.

m-to-n

Many to many.

protocol

Protocol to use when forwarding packets.

option

-

tcp

Option

Description

tcp

TCP.

udp

UDP.

sctp

SCTP.

icmp

ICMP.

service <name>

Service name.

Service name.

string

Maximum length: 79

type

Configure a static NAT or access proxy.

option

-

static-nat

Option

Description

static-nat

Static NAT.

access-proxy

Access proxy.

config firewall vip

config firewall vip

Configure virtual IP for IPv4.

Syntax

config firewall vip
    edit <name>
        set comment {var-string}
        set extintf {string}
        set extip {user}
        set extport {user}
        set id {integer}
        set mappedip <range1>, <range2>, ...
        set mappedport {user}
        set portforward [disable|enable]
        set portmapping-type [1-to-1|m-to-n]
        set protocol [tcp|udp|...]
        set service <name1>, <name2>, ...
        set type [static-nat|access-proxy]
    next
end

Parameters

Parameter

Description

Type

Size

Default

comment

Comment.

var-string

Maximum length: 255

extintf

Interface connected to the source network that receives the packets that will be forwarded to the destination network.

string

Maximum length: 35

extip

IP address or address range on the external interface that you want to map to an address or address range on the destination network.

user

Not Specified

extport

Incoming port number range that you want to map to a port number range on the destination network.

user

Not Specified

id

Custom defined ID.

integer

Minimum value: 0 Maximum value: 65535

0

mappedip <range>

IP address or address range on the destination network to which the external IP address is mapped.

Mapped IP range.

string

Maximum length: 79

mappedport

Port number range on the destination network to which the external port number range is mapped.

user

Not Specified

name

Virtual IP name.

string

Maximum length: 79

portforward

Enable/disable port forwarding.

option

-

disable

Option

Description

disable

Disable port forward.

enable

Enable port forward.

portmapping-type

Port mapping type.

option

-

1-to-1

Option

Description

1-to-1

One to one.

m-to-n

Many to many.

protocol

Protocol to use when forwarding packets.

option

-

tcp

Option

Description

tcp

TCP.

udp

UDP.

sctp

SCTP.

icmp

ICMP.

service <name>

Service name.

Service name.

string

Maximum length: 79

type

Configure a static NAT or access proxy.

option

-

static-nat

Option

Description

static-nat

Static NAT.

access-proxy

Access proxy.