Port forwarding enables the client to obtain TCP packets with a specified destination IP address and port number to access specified intranet resources.
Remote users can use port forwarding to access TCP resources on an intranet. TCP resources refer to upper-layer applications based on TCP, such as Telnet, remote desktop, FTP, and email. The following example illustrates the process.

After the login is successful, the remote user enables the port forwarding service on the virtual gateway page. Then, the virtual gateway delivers an instruction to the browser of the remote user so that the Active control of the browser starts to monitor the local Telnet access requests in real time.
The ActiveX control of the browser needs to capture the Telnet connection request first so that the request can be forwarded to the virtual gateway through the port forwarding. The detailed process is as follows. The ActiveX control monitors the Telnet service all the time. Once the ActiveX control finds that the Telnet client initiates a Telnet request, it changes the destination address of the Telnet request to its loopback address and port to another port. For example, if the IP address of the Telnet server is 10.1.1.1 and the port number is 23, the ActiveX control changes the destination address to the loopback address 127.0.0.1 and the destination port number to 1047 (1024+23). In this way, the Telnet connection request is captured. After the Telnet request is captured, the real Telnet request is transmitted to the virtual gateway through the SSL-encrypted tunnel.
The ActiveX control of the browser decrypts the Telnet response.
Figure 2 shows the FW security zones that packets pass through.
When a remote user accesses a Telnet server, the packets that pass through the FW are classified into two types, and the corresponding security policies are as follows:
The encrypted SSL VPN packets pass through the Untrust zone to the Local zone.
The decrypted service packets pass through the Local zone to the Trust zone.