Created on
09-26-2024
11:57 PM
Edited on
07-09-2025
02:05 PM
By
Jean-Philippe_P
Description |
This article describes the pros and cons of using the 'any' option for the Virtual IP (VIP) Interface setting (aka extintf in the CLI), including scenarios where it can be useful as well as potential behavioral pitfalls to be aware of. |
Scope | FortiGate, Virtual IPs. |
Solution |
To summarize the main difference between using 'any' vs. a specific network interface for Virtual IP listening interfaces:
It is important to point out that while VIPs are primarily used for performing DNAT, they are also used for outgoing Source NAT (SNAT). When traffic meets certain conditions, that traffic can be Source NAT'd to the VIP's external IP address, rather than the Outgoing Interface Address or IP Pool address. Refer to this KB article for an in-depth explanation of these conditions: Technical Tip: Mapping VIP outbound connections (Source NAT).
Pitfalls when using 'any' interface for Virtual IP. When the above behaviors are combined (i.e., traffic can be SNAT'd to the VIP's external IP address, and VIPs set to 'any' can affect ALL interfaces), there is potential for disruptive and unintended behavior. Consider the following example scenario:
After everything is configured in the above scenario, the following behavior is observed during testing:
After some troubleshooting, the admin finds that the LAN host's traffic arrives on the FortiGate and is Source NAT'd to 10.0.0.100, rather than the FortiGate's outgoing WAN interface address.
In this scenario, the conditions have been met for using the 'any' VIP's External Address for outgoing Source NAT (Traffic sourced from 172.16.0.100 that is egressing 'any' interface using a Firewall Policy with SNAT enabled), so the LAN Host is SNAT'd to the VIP address rather than the Outgoing Interface Address of the WAN interface.
If a specific interface is set on the VIP instead of 'any' (for example, using the DMZ interface instead), then this issue would not have occurred, and traffic going from LAN to WAN would instead use the WAN interface address for Source NAT.
Workarounds and Recommendations:
config firewall vip edit <vip_name> set srcintf-filter <space-delimited entries> next end
|
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.