Fixing asymmetric routing problems with policy-based routing

FortiWeb's Static Routes configuration directs outgoing traffic based on packet destination. However, some environments require you to also use the Policy Route settings to route outgoing traffic based on source IP address, the incoming interface, or both.

For example, if your FortiWeb receives traffic from more than one gateway, it is possible for request and reply packets in the same TCP connection to use different gateways (asymmetric routing), which can break the connection. Policy-based routing can correct this problem by ensuring that replies to clients use the same interface as the original request.

For example, a FortiWeb has a default static route that forwards traffic for any destination to, which is the gateway for ISP1. However, the appliance also has a virtual server with the address that receives traffic from the ISP2 gateway, which has an IP address of

A client request destined for the virtual server arrives from the client with the IP address In reverse proxy mode, FortiWeb opens a connection to the server pool member on behalf of the client. The pool member’s reply contains the destination provided by FortiWeb ( but not the interface associated with the request. Using the Static Route settings only, FortiWeb routes the reply to gateway for all destinations, which does not have the correct state information for the TCP connection.

Routing using static route only

The following Policy Route settings fix this asymmetric routing issue by directing outgoing traffic based on the source IP. Because all incoming traffic for virtual server arrives on the IP2 gateway, you configure FortiWeb to route all replies from to that gateway. In addition, the configuration directs any outgoing traffic from the virtual server with an IP address (which receives traffic over the default gateway) to the default gateway:

config router policy

edit 1

set src

set gateway

set oif port1


edit 2

set src

set gateway

set oif port2



Routing by source IP using policy routes