1, download the first mode with apt-get install rinetd or download from the official website http://www.boutell.com/rinetd/
2, configuration, port forwarding configuration in/etc/rinetd.conf
Configuration rules
0.0.0.0 8080 172.19.94.3 8080
0.0.0.0 2222 192.168.0.103 3389
1.2.3.4 80 192.168.0.10 80
Description (0.0.0.0 indicates that all available addresses are native bound)
Forward all requests destined for native 8080 ports to port 8080 of 172.19.94.3
Forward all requests destined for native 2222 ports to port 3389 of 192.168.0.103
Forward all 80 port requests destined for 1.2.3.4 to port 80 of 192.168.0.10
The command format is
Bindaddress Bindport connectaddress Connectport
Bind the port of the address-bound port to which the connection is connected
Or
[Source Address] [Source Port] [Destination Address] [Destination Port]
Source address source port destination Address destination port
3, open
Start the program
Pkill rinetd # #关闭进程
Rinetd-c/etc/rinetd.conf # #启动转发
Add this command to the/etc/rc.local and you can start the operation automatically.
UBUNTU14 Install port forwarding tool rinetd