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

Fortigate packet processing DNAT vs existing connection return path, what will it do?

Hey everybody.  I have a question about how a Fortigate 1000D will process a packet in regard to DNAT vs an already existing connection that was initiated in its connection table.  I have 2 servers inside my system that are webservers and are IPed with IPs from the 10.0.0.0/8 private IP space.  One of them initiates an SFTP connection out to an external entity/network.  On the way out of the Fortigate I have a SNAT pool set to overload to SNAT these packets to a public network X.X.162.10.   On this same Fortigate I also have a DNAT for external IP X.X.162.10 for traffic initiating on the outside to come in but the DNAT is pointed to a Virtual Server IP of an f5 Big IP LTM load balancing device.  When the traffic from my connection that initiated inside my system comes back from the other side or distant end what is my fortigate going to do with it?  Will it realize it is the return path for an existing connection that initiated outbound or will it process it as a DNAT since I have a DNAT for that same IP?  This is causing me issues because I believe at times my return path traffic is being sent to the f5 load balancer and sometimes the return traffic makes it back to the wrong server.   Thanks in advance. 

2 REPLIES 2
Nicholas_Doropoulos
Contributor

The easiest way to find out would be to run a debug flow with the traffic flowing in real time. It should be something along these lines:

 

diag debug enable diag debug flow filter add <PC1>    or    diag debug flow filter add <PC2> diag debug flow show console enable diag debug flow trace start 100          <== this will display 100 packets for this flow diag debug enable

 

Feel free to modify the filters accordingly for your case.

NSE5, CCSE, CCNA R&S, CompTIA A+, CompTIA Network+, CompTIA Security+, MTA Security, ITIL v3

NSE5, CCSE, CCNA R&S, CompTIA A+, CompTIA Network+, CompTIA Security+, MTA Security, ITIL v3
emnoc
Esteemed Contributor III

Those are two sessions; the fortigate maintain state; maintain  direction, along with the above suggestion you can reveiw the diag sys session

 

The device is not going to  get confuse if that's what your thinking is  leading to ;)

 

PCNSE 

NSE 

StrongSwan  

PCNSE NSE StrongSwan
Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors