|Description||This article describes port forwarding using FortiGate Virtual IPs.|
FortiGate v6.2.x, 6.4.x,7.0.x,7.2.x
Add 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:
- Add a Virtual IP enabled with Port Forwarding.
- Add a firewall policy with a virtual IP.
This example describes how to configure port forwarding to allow access to an internal Windows Server PC with the Remote access protocol which uses the default port of 3389.
To add a virtual IP that forwards RDP packets
1.1) Select Create New.
1.2) Add a name for the virtual IP.
1.3) Select the External Interface. This will typically be the interface that connects the FortiGate to the Internet.
1.4) Set the External IP Address/Range. The following can be used:
- The FortiGate unit public IP.
- If there is a cable or DSL connection with a dynamic IP, it is possible to use 0.0.0.0.
- If the ISP provides a block of IPs that route to the FortiGate external interface, it is possible to add one of these IPs here.
4) Set the Mapped IP Address to the internal IP address of the Windows Server PC.
5) Select Port Forwarding.
6) Set protocol to TCP.
7) Set External Service Port and Map to Port. For this example, the RDP service uses port 3389. Set both External service port and Map to Port to 3389.
8 ) Select OK.
Now all that’s left is to define a firewall policy that accepts RDP traffic from the Internet and forwards it to the internal Windows Server PC.
To add a firewall policy with a virtual IP.
1)In 6.0, Go to Policy & Objects -> IPv4 Policy.
2) Select Create New.
3) Set Source Interface to the WAN/Internet interface.
4) Set Source Addresses to all.
5) Set Destination Interface to internal.
6) Set the Destination Address to the name of the virtual IP.
7) Usually, the remainder of the options in this firewall policy does not need to be changed. For example, the Service can remain ANY, because the virtual IP only forwards packets using port 3389.
8 ) Select OK.
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 2023 Fortinet, Inc. All Rights Reserved.