Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
atsak
New Contributor III

Policy based route for all outbound traffic

Scenario - FG200E on datcenter side, FG60E on branch side

 

Using a policy based route I'd like a particular source IP on the branch side to route all traffic via the tunnel to the datacenter then out on the internet via the outbound interface IP.

 

Running 6.2.1

 

Followed this article:

https://kb.fortinet.com/kb/documentLink.do?externalID=FD38790

 

Route is selected but does not actually pass traffic (hit count increments).   Both sides configured with opposite IP on the tunnel, can ping the IP of the local tunnel assigned address but not remote.   Tried also just configuring only the branch side of the private IP, but that also doesn't work.

 

Tunnel is up and working.

Policies are in place and working (tested using a Juniper firewall which does not require the IP be assigned to the interface for policy based routing, traffic flows as expected on that equipment)

 

Anyone have this working?  What did you do or what does the configuration look like on both sides?

 

8 REPLIES 8
Toshi_Esumi
Esteemed Contributor III

You still need to have a default route into the tunnel in addition to the default route via the local internet. Then the policy route can choose the one into the tunnel based on the source.

I recommend you use two static default routes then put higher number of priority (lower priority) on the one toward the tunnel so that all the other traffic prefer the local internet.

atsak
New Contributor III

So static route 0.0.0.0/0.0.0.0 interface TUNNELNAME distance 100 or does it need to be the same distance as the WAN1 link and just a lower priority (but higher number in the actual priority field)

 

 

Toshi_Esumi
Esteemed Contributor III

Not a distance, which is a different matric. Leave the default value (10?) for distance for both. You might need to expand "Advanced Options" in GUI to see Priority setting. I regularly use CLI so I'm not familiar how it would look like.

atsak
New Contributor III

Right, made those changes, but the traffic still does not pass.    It selects the policy fine for routing but the traffic never hits the permit rule nor the remote site, the firewall rule shows a hit for traffic from the policy selected IP hitting the rule to permit the traffic outbound to the VPN interface but no traffic passes back, even though on another firewall at the branch end (the Juniper) it does. . . 

 

I'm going to open a TAC case but if you have any other suggestions I'd appreciate them.

Toshi_Esumi
Esteemed Contributor III

Do the VPN's phase2 network selectors include the source IP <-> 0/0?

atsak
New Contributor III

For anyone who needs to do this in the future, most of the steps are now captured upthread, but in summary:

 

Follow this article as described:   https://kb.fortinet.com/kb/documentLink.do?externalID=FD38790

Then add 0.0.0.0/0 to the phase 2 of the tunnel you intend to route the traffic over

Then add a static route for 0.0.0.0 with a lower priority (ie higher priority number)

Then add the policy route for the source IP

Then add a policy to the firewall policies to permit from the source IP to 0.0.0.0 via the IPSec tunnel

On the far end firewall of the tunnel you just need a policy to permit from the near end IP address block to all.

 

 

 

 

 

 

 

 

Toshi_Esumi
Esteemed Contributor III

I didn't know a policy route into a tunnel required an GW IP. I guess I need to test various variations.

emnoc
Esteemed Contributor III

The "diag debug flow" is your best friend for analyzing flow issues. It is your 1st step in  trouble-shooting. Did you do that ?

 

 

Ken Felix

PCNSE 

NSE 

StrongSwan  

PCNSE NSE StrongSwan
Labels
Top Kudoed Authors