# config firewall vipNote.
(vip) show
# config firewall vip
edit "SSH_redirect"
set extip 10.10.10.10
set extintf "any"
set portforward enable
set mappedip "10.10.10.10"
set extport 22
set mappedport 222
next
end
# config firewall vipWith FortiOS 6.0 and 6.2 releases, unlike with FortiOS 5.4 and 5.6, Firewall VIP objects with same external and Mapped IP needs to be assigned a type of 'load-balance' instead of 'static-nat'.
(vip) edit SSH_redirect
new entry 'SSH_redirect' added
(SSH_redirect) set extip 10.10.10.10
(SSH_redirect) set extintf any
(SSH_redirect) set mappedip 10.10.10.10
(SSH_redirect) set portforward enable
(SSH_redirect) set extintf 22
(SSH_redirect) set mappedport 222
(SSH_redirect) end
Static NAT's extip should be different from mappedip.
object check operator error, -8, discard the setting
Command fail. Return code -8
# config firewall vipNote.
(vip) edit SSH_redirect
new entry 'SSH_redirect' added
(SSH_redirect) set extip 10.10.10.10
(SSH_redirect) set extintf any
(SSH_redirect) set mappedip 10.10.10.10
(SSH_redirect) set portforward enable
(SSH_redirect) set extintf 22
(SSH_redirect) set mappedport 222
(SSH_redirect) set type load-balance <-----
(SSH_redirect) end
# diag debug config-error-log readNote.
>>> "next" @ root.firewall.vip.SSH_redirect:failed command (error 1)
>>> "set" "dstaddr" "SSH_redirect" @ root.firewall.policy.1:value parse error (error -3)
>>> "next" @ root.firewall.policy.1:failed command (error 1)
# config firewall vip
edit "SSH_redirect"
set extip 10.10.10.10
set extintf "any"
set portforward enable
set mappedip "10.10.10.10"
set extport 22
set mappedport 222
next
end
# config firewall policyTo avoid losing such kind of objects during the upgrade, it is required to modify, before upgrading, the original FortiOS 5.4 / 5.6 configuration as per the below procedure.
edit 1
set name "Lan-2-DMZ"
set srcintf "port4"
set dstintf "port3"
set srcaddr "all"
set dstaddr "SSH_redirect" <-----
set action accept
set schedule "always"
set service "SSH"
set nat enable
next
end
# config firewall vipBelow the Firewall Policy referring to the VIP.
edit "SSH_redirect"
set extip 10.10.10.10
set extintf "any"
set mappedip "10.10.10.10"
set portforward enable
set extport 22
set mappedport 222
set type load-balance <-----
next
end
# config firewall policy
edit 1
set name "Lan-2-DMZ"
set srcintf "port4"
set dstintf "port3"
set srcaddr "all"
set dstaddr "SSH_redirect" <-----
set action accept
set schedule "always"
set service "SSH"
set nat enable
next
end
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.