Port forwarding of lcx

 

lcx.exe is a port forwarding tool, there are two versions of Windows and Linux, Windows Edition is lcx.exe, Linux version is portmap

 

Windows version using the following method:

lcx has two functions:

1 ) Port forwarding (listen in pairs and slave)
 2 ) port mapping (Tran)

1, the network port forwarding LCX
performed on (1), the internal host: lcx.exe -slave public network server ip public ip host port of the host network the network host port

lcx.exe -slave public network host ip 4444  127.0 . 0.1  3389

It means to forward the host within the network port 3389 to port 4444 of a host having a public network ip

(2) performing public Lcx.exe -listen a public network host port on the host public network host port 2

lcx.exe –listen 4444 5555

It means 4444 for public hosts request listening port of the machine, and the request is transmitted from port 4444 to port 5555.

At this point, enter mstsc RDP connection, Windows command line, you can open a Remote Desktop connection:

2, the local port forwarding

Since the firewall restrictions, such as the port portion 3389 can not pass through the firewall, the target host can now spread through port 3389 to allow other ports in the firewall, such as port 53,

Performed on the target host:

-tran LCX 53 target host ip 3389

At this time we can directly connect to the remote desktop to the target host IP: 53

Note: The software may be killed soft killing, may seek to avoid killing their own version.

 

Linux version to use:

First performed on the host computer has a public network ip:

-m ./portmap 2 -p1 6666 -H2, -P2 public network host IP 7777

Meaning that listens for requests from port 6666, the port will forward it to 7777

And then the inner network host performs:

-m ./portmap . 3 -H1 127.0 . 0.1 -p1 22 is -H2, -P2 public network host IP 6666

It means that the host within the network to forward traffic on port 22 to port 6666 public network host.

And then execute the command line in Linux

ssh public network host ip 7777

To connect the network host.

Guess you like

Origin www.cnblogs.com/yyxianren/p/11387555.html