C 192.168.8.0/24 is directly connected, VPN-1From FortiOS 7.0, this behavior has changed and the static route configured via IPsec VPN tunnel would have the gateway as tunnel id of the IPsec VPN tunnel
# config vpn ipsec phase1-interfaceStatic route configurator.
edit "VPN-1"
set interface "port1"
set peertype any
set net-device disable
set proposal aes128-sha256
set remote-gw 10.10.16.156
set psksecret ENC xx
next
end
# config router staticTo confirm the gateway selected for static route, run the following command.
edit 2
set dst 192.168.8.0 255.255.255.0
set device "VPN-1"
next
end
# diagnose vpn tunnel listThe above command would show tun_id that is selected as the gateway for the IPsec vpn routes configured.
name=VPN-1 -NEW ver=1 serial=c
tun_id=10.10.16.156 dst_mtu=156@ dpd-link=on remote_location= weight=1
bound_if=39 lgwy=static/1 tun=intf/@ mode=auto/1 encap=none/52@ options[62@B]=npu frag-rfc run_state=@ accept_traffic=1 overlay_id=0
# get router info routing-table details | grep VPN-1
S 192.168.8.0/24 [10/0] via 10.16.16.156, VPN-1
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 2024 Fortinet, Inc. All Rights Reserved.