Skip to main content
ehsangha
Explorer II
Sep 2, 2025 12:37 PM UTC
Question

IPsec Phase 2

Hi everyone.

I have a question about IPsec phase 2 in FortiGate. I need to create nearly 60 IPsec site-to-site tunnels. At the center site, we have 8 different subnets. Is it better to create a separate Phase 2 for each subnet or use 0.0.0.0/0 as the local and remote site in Phase 2?

8 replies

funkylicious
SuperUser
SuperUser
Sep 2, 2025 1:42 PM UTC

i personally find 0.0.0.0/0 selectors to give you more flexibility and its easier to scale any changes.

Translate
"jack of all trades, master of none"
sw2090
SuperUser
SuperUser
Sep 2, 2025 1:47 PM UTC

indeed. It only gets quite obfuscating with so many phase2s :)

I also tend to use an open (i.e. 0.0.0.0/0) p2 selector and then do the rest with routing and policies.

Translate
Toshi_Esumi
SuperUser
SuperUser
Sep 2, 2025 4:05 PM UTC

In addition, that's the size of network you want to use routing protocol either OSPF or BGP.

Toshi

Translate
ede_pfau
SuperUser
SuperUser
Sep 3, 2025 8:53 PM UTC

If both sides/sites use Fortigates, I'd use an address group as 'named address'. Make it routeable, right from the start. Then I use it in

- phase2

- policy

- static route

 

And for 60 s2s VPNs, use a template and script it, along with the address groups.

Using the wildcard '0.0.0.0/0' is a FortiOS speciality.

Translate
Yurisk
SuperUser
SuperUser
Sep 4, 2025 8:46 AM UTC

Provided that at both ends you have Fortigates (e.g. Checkpoint doesn't play well with 0.0.0.0) then using 0.0.0.0 for the encryption domain would be a common practice, usually you also run BGP or (less so - OSPF) on them to advertise subnets of each other, and this way save yourself configuring static routes on remote FGTs. 

Translate
yurisk.info - all things Fortinet blog, no ads
ehsangha
ehsanghaAuthor
Explorer II
Sep 15, 2025 3:25 PM UTC

I appreciate everyone's responses. I received my response. Could someone please explain to me what's happening in the FortiGate routing table when we put 0.0.0.0/0 in phase 2 IPsec? and whether they clash if we have 0.0.0.0/0 directed to the WAN interface?

Translate
Toshi_Esumi
SuperUser
SuperUser
Sep 15, 2025 3:45 PM UTC

The IPsec phase2 selector has almost nothing to do with the routing table. It's just a filter what kind of traffic (source and destination) to be passed over the IPsec tunnel with the SA. When you make it as 0/0<->0/0, all traffic is eligible to go over/come through the tunnel. 
No impact to your FGT's routing table.

Toshi

Translate
Riolab23
New Member
Sep 17, 2025 10:57 AM UTC

If your FortiGate device is stuck on "negotiating" during IPsec Phase 2, try these:

Check Debug Logs: Use diag debug application ike -1 for detailed logs.

Verify Configurations: Ensure both ends have matching Phase 2 settings.

Check for Duplicate Selectors: Look for conflicts in policy and object addresses.

Review Keepalive Settings: Enable "Keep Alive" for idle tunnels.

Check FortiOS Bugs: Ensure you’re on a stable FortiOS version.

For more details, visit the Fortinet Community.

Translate
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