Several cookbooks and VPN manuals reference the following in their troubleshooting sections:
"On some FortiGate units, such as the FortiGate 94D, you cannot ping over the IPsec tunnel without first setting a source-IP. In this scenario, you must assign an IP address to the virtual IPSEC VPN interface. Anything sourced from the FortiGate going over the VPN will use this IP address."
How do I set the source-IP of my IPSEC VPN interface? I'd like to be able to ping from our firewalls to each other after creating the tunnel.
Go to either GUI "Network->Interface" and select your tunnel interface name then "Edit".
There should be "Address" section includes "IP" and "Remote IP". You can use any IPs but both go into the routing table as connected /32 routes. Then make sure you allow "PING" in "Restrict Access" section.
I don't think the GUI exposes the source IP for IPsec interface vpns in 5.4.x. It only allows you to set the remote IP. I have set my local ip through the CLI as follows:
conf vpn ipsec phase1-interface
edit <ipsec-name>
set local-gw IP.IP.IP.IP
end
Ah, interface ip vs ipsec gateway ip. Thanks for the info Toshi.
Toshi I did what you said.
IP: 10.255.255.17
remote IP: 10.255.255.18/30
In the other device, I did the same para changing the IPs. I checked the PING access on both interfaces.
But it doesn't work.
What I missed?
Are you running 5.6.3? otherwise you shouldn't be able to set the prefix length /30 on remote-ip as I showed in GUI. My 50E is 5.4.8.
And is the other end supposed to be pingable? Another FG or something else? If it's supposed to be but still not pingable the tunnel is not up. Is the tunnel actually up?
Hi Toshi,
Yes, both fortigate devices are in 5.6.3
Both are pingable.
The tunnel is up and running.
I was thinking that maybe the IPs which I set in the VPN interfaces should belong to the networks which are configured to pass through the tunnel? I didn't test yet.
Check the routing table (get router info routing-t all, or database). Even if there are some super subnets you wouldn't have the same /30 or /32 subnet in it. Both sides should show up in the table with 'C' - connected, and with the vpn interface name.
Also check trusthost too.
Everything that you say was fine. But finally, I found the issue. The addressing that you use in the ends of the tunnel has to belong to the addressing which is configured to pass through the tunnel (phase 2).
Now all is working, thanks for the help!!!
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1748 | |
1114 | |
765 | |
447 | |
241 |
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.