The configuration of Windows server port forwarding can be realized by using the portproxy function of Windows. The operation is as follows:
The meaning of this command is:
Use ipv4 to ipv4 mode to proxy port 22 with the source address of 18.104.22.168 to port 12345 of all addresses of the server. The source address can also be changed to the intranet address of the server with interconnected intranets.
You can use show all to view the configuration information of port forwarding that has been added:
After the port forwarding configuration is completed, you can directly access port 12345 of the public network address of the local device and the actual access is port 22 of the server at 22.214.171.124.
If you want to delete the configured forwarding policy, you can delete it by using the following command: