TCP port forwarding from the Windows operating system

Source: Internet
Author: User
Tags haproxy

Because a project in the work, headquarters and each branch only the Citrix server can communicate, the headquarters client wants to access the branch intranet resources through the branch Citrix. The basic idea is to modify the IP address and port in the ICA file obtained by the program, return the modified ICA file to the client, and enable the client to automatically jump to another network Citrix by connecting to the local Citrix. Previously used is haproxy, but Haproxy and program interaction is not very good, if each division has only one Citrix server, in advance static write can also, but the general branch will have more than one Citrix server, not to determine which Citrix server each time it is used, In this way, it is more difficult to add the mapping entries dynamically through the program.

-----Haproxy is mainly used for load, if it is only a load, then it becomes a port mapping, but after all, Linux is the following program.

-----Windows also has a gadget: Portforward.exe, the graphical interface is easy to operate, the individual can use the usual, but there is no way to achieve interaction with the program.

http://pcedu.pconline.com.cn /SOFT/VIRUS/SAFE/0710/1130476.HTML&NBSP

If you want to cancel the port forwarding configured above, you can use the following statement:

netsh interface  portproxy Delete v4tov4 listenaddress=192.168.1.8  listenport=33891

If you want to see which port forwarding has been configured, you can use the following statement:

Netsh Interface  portproxy Show  v4tov4

B. Advantages
You can add or remove port forwarding entries as needed at any time, and restarting the operating system can still automatically save the previous configuration and automatically enable it. Unlike Haproxy, you will need to restart Haproxy if you finish modifying the configuration file.

Some say XP configuration port forwarding does not work, it is estimated that the IPV6 is not installed, with XP testing, after installing the IPV6 can implement port forwarding, and do not need to open the Routing and Remote Access service.

In addition to the redundancy of port forwarding, multiple hosts can configure Port forwarding without specifying a local listener address, which allows for redundancy by providing a floating address for the operating system:
Netsh  interface portproxy add v4tov4 listenport=14941 connectaddress=192.168.1.118  connectport=1494

Program Implementation dynamically add, you can telnet to each of the Add entries, You can also only contact the virtual address, each time to check whether there is a corresponding mapping entry (according to the ICA file needs to connect the IP address of the Citrix server to check), if not the command line to add, to ensure that the local port is not occupied, and also need to consider the firewall, Add an inbound port access rule with Netsh.

----requires a Citrix host to turn on the Telnet service and set access control to allow only specific hosts to connect.

TCP port forwarding from the Windows operating system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.