Skip to main content
Visitor III
Nov 3, 2026 9:18 PM UTC
Solved

VRF-based IPSec VPNs

Hi! I´m looking for advice configuring an IPSec hub with FortiOS 8.0.1 for terminating IPSec site-to-site tunnels from multiple remote sites.

We have a relatively high number of remote sites >50 with very low traffic (just remote management), but overlapping IP ranges.

The IPsec tunnel interfaces (the inside of the tunnels) would need to connect to different VRFs. The tunnels would be initiated by the remote sites, which have different source IPs in the Internet,  but on the hub site all IPsec tunnels are terminated on a single public IP. 

Can I create a VRF instance per remote site?

Having >50 VDOMs would not be feasible, as we are talking about maybe 10Mbps aggregate traffic and a relatively small firewall at the hub site, which can only support 10 VDOMs (like a an FG-120G).

Some remote site will not have Fortigates, but most of them have. 

Is this doable at all? 

BR Peter 

funkylicious
SuperUser
Nov 4, 2026 5:08 PM UTC

if you want a dialup setup, you could create a separate dialup vpn for each branch and assign it to a vrf, but not a single one.

each tunnel would have a unique setup with local-id / peer-id to distinguish between them

"jack of all trades, master of none"

13 replies

Toshi_Esumi
SuperUser
SuperUser
Nov 3, 2026 10:10 PM UTC

Regardless VRF or VDOM you use to segregate those overlapping subnet lcoations, they need to reach the same subnet at the HUB or even spoke-to-spoke. So to allow that you need to use SNATs/DNATs to map those overlapping subnets to unique subnets somewhere.
That mains if you do the SNATs/DNATs at the IPsec interface, you should be able to terminate all IPsecs at one place.

Toshi

UrbiAuthor
Visitor III
Nov 4, 2026 9:40 AM UTC

Hi Toshi, thanks for your answer! I know, but my goal is different, I don´t want to NAT anything and I don´t need to as long as I can do it like this: 

Site1Network --- IPSEC1 --- VRF1 --- VLAN1 -- terminal1 (PC) 

Site2Network --- IPSEC2 --- VRF2 --- VLAN2  -- terminal2

…..

Site1, Site2 might just use the same IP range, but as long as I keep routing separated via VRFs, I´m good to route on the firewall inside the VRF between my terminals and site networks, 

So basically I wan´t to terminate each tunnel in it´s own VRF. This would be my question. 

Sorry if I was a bit unclear! 

Toshi_Esumi
SuperUser
SuperUser
Nov 4, 2026 5:16 PM UTC

Ok. But you can still accomplish this with VIP/SNAT without VRF or VDOM. If you just want to test/try VRF, so be it.

Toshi

sjoshi
Staff
Staff
Nov 3, 2026 11:27 PM UTC

Instead of creating VRF or VDOM (more than 10 VDOM needs additional license), if I understand your setup will have HUB with IP range say 192.168.1.x but multiple spokes will have same IP range 172.10.10.x

So best way would be creating VPN on the FGT without VDOM/VRF but using IP pool and VIP on the FGT policy

 

May refer:

https://docs.fortinet.com/document/fortigate/8.0.2/administration-guide/426761/site-to-site-vpn-with-overlapping-subnets

https://community.fortinet.com/fortigate-3/technical-tip-applying-snat-and-dnat-over-the-ipsec-tunnel-193154

Thanks, Salon
UrbiAuthor
Visitor III
Nov 4, 2026 10:05 AM UTC

Thanks Salon!  

As I wrote Toshi, I might have been a bit unprecise in my first posting, but I´m not asking about NAT. I´m rather interested in working with VRFs.

Also , you mention, on an FG-120G I need licenses to have more than 10VDOMs, but AFAIK an FG-120G can only have 10VDOMS max? The datasheet says “Virtual Domains (Default / Maximum) 10 / 10”, can I override that maximum value by buying additional licenses? 

Br

Peter

funkylicious
SuperUser
SuperUser
Nov 4, 2026 10:20 AM UTC

in regards to vdoms, short answer is no. as per the link and the datasheet, this value is the max and cannot be upgraded at this time - https://docs.fortinet.com/max-value-table?family=fortigate&version=8.0.1&models=121G&search=vdom

as per vrf , you could assign a ipsec interface to a specific vrf but this will limit the routing only to that particular vrf, all the existing interfaces/vlans would belong to vrf 0 which is the default.

starting with fortios 8 a new feature has been introduced which might the solution to your situation w/o needing vdom or inter-vdom link to route leak between vrfs - https://docs.fortinet.com/document/fortigate/8.0.2/administration-guide/342655/route-leaking-between-multiple-vrfs 

"jack of all trades, master of none"
UrbiAuthor
Visitor III
Nov 4, 2026 4:08 PM UTC

Thank you all for your answers, so basically these narrow down the issue to a single question: 

Is there any way to assign a dynamic IPsec tunnel to a specific VRF based on the identity of the source? 

(The answer of ​@funkylicious almost implies, there is no such thing, but maybe there is still something I have overlooked? How do I request a new feature? 😀)  

funkylicious
SuperUser
SuperUser
Nov 4, 2026 5:08 PM UTC

if you want a dialup setup, you could create a separate dialup vpn for each branch and assign it to a vrf, but not a single one.

each tunnel would have a unique setup with local-id / peer-id to distinguish between them

"jack of all trades, master of none"
UrbiAuthor
Visitor III
Nov 4, 2026 6:51 PM UTC

Well, that wouldn´t be an issue, to configure an own dialup VPN, but how to to assign those to a VRF? For reference: 

I tried and it looks like it could really work. The key was to enable device creation in the Advanced network settings for the dialup VPN: 

Then, without having the VPN brought up, I can go to the CLI and assign a VRF: 

 edit "diup_site1"
        set vdom "root"
        set vrf 101
        set type tunnel
        set snmp-index 13
        set interface "wan"

    next

Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024