We want to keep the source IP intact when TCP traffic goes to load balancer and forward the TCP traffic to the nodes behind load balancer. In HTTP based traffic we can do it via XFF but we dont know how to handle the source IP in TCP based traffic. We are using Fortinet firewall load balancer
Hello @ZH ,
If you don't use snat on the firewall policy, the source IP address reaches FortiADC. After this, FortiADC applies snat to the package, and the server can't see the real client IP address. According to my research, you have two options for TCP traffic.
First one, you can use TCP option 28 for TCP traffic. This option can add a real client IP address inside the TCP package. You can review this document for TCP option 28 (title Enhanced TCP command).
https://docs.fortinet.com/document/fortiadc/7.4.3/handbook/190300/whats-new
Second one, you can use direct routing mode on VS. But in this scenario, I think the server gateway address should be FortiADC. If its not, Fortigate will drop the packet because of asymmetric routing.
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1741 | |
1109 | |
755 | |
447 | |
240 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.