Created on 10-19-2023 10:28 PM Edited on 08-16-2024 05:02 AM By Anthony_E
Description |
This article describes the function and behavior of the ‘translate-host’ setting under virtual server real server configuration. |
Scope |
FortiGatev 7.2.4/v7.4.0 and newer. |
Solution |
Topology:
The translate-host feature for virtual server load balancing allows the FortiGate to alter the ‘Host’ field in the client HTTP request headers when these requests are processed through a virtual server. The ‘host’ field is translated from the client request(IP entered into a web browser) to the real server’s IP address and port.
Example Configuration:
config firewall vip
The ‘translate-host’ setting is enabled by default, meaning that it is normally hidden when running the ‘show’ command for a virtual IP object. The ‘show full’ command can be used to verify whether or not ‘translate-host’ is enabled.
Behavior: Client accesses website via the virtual server’s external IP address(10.0.103.3). Note that the ‘Host’ field in the HTTP request headers is the same as the value entered in the web browser’s address bar.
Packet Capture on the webserver shows the FortiGate translating the host field from the HTTP request to the real server’s destination IP and port:
This behavior can be disabled by changing the translate-host setting on the CLI, this can be done with the following command:
config firewall vip
Limitations: Translation of the host field does not occur even if the setting is enabled under the following conditions:
Related articles: Technical Tip: Understanding Absolute vs. Relative URLs in Server Redirects 302 Technical Tip: ZTNA - Zero Trust Network Access Resource List |
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 2024 Fortinet, Inc. All Rights Reserved.