Description |
This article describes port forwarding using FortiGate Virtual IPs. |
Scope |
FortiGate. |
Solution |
Create Virtual IPs to enable port forwarding:
To forward TCP or UDP ports received by the FortiGate external interface to an internal server, follow two steps:
This example describes how to configure port forwarding to allow RDP access to an internal server on port 3389. To add a virtual IP that forwards RDP packets, follow the steps below.
After, all that remains is to define a firewall policy that accepts RDP traffic from the Internet and forwards it to the internal server. To add a firewall policy with a virtual IP:
Note: If the 'External service port' and 'Map to IPv4 port' are different, both ports must be specified in the 'Service' field of the firewall policy (if it is not set to 'any').
config firewall vip edit "Test" set extip 20.20.20.20 next end
Packet Sniffer:
diag sniffer packet any ' host a.a.a.a and port bb ' 4 0 l <----- <a.a.a.a is the source IP and port bb is the NAT port>.
Debug Flow:
diagnose debug disable
diagnose debug flow trace stop
diagnose debug flow filter clear
diagnose debug reset
diagnose debug flow filter addr x.x.x.x <----- x.x.x.x is the src IP.
diag deb fl sh ip en
diagnose debug flow show function-name enable
diagnose debug console timestamp enable
diagnose debug flow trace start 999
diagnose debug enable
|
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.