Port forwarding tool rinetd

The most simple and easy port forwarding tool under linux
official website address http://www.rinetd.com/
wget http://www.rinetd.com/download/rinetd.tar.gz

Extracting installer
tar zxvf rinetd.tar.gz
the make
the make install

Edit Configuration
vi /etc/rinetd.conf
0.0.0.0 172.19.94.3 8080 8080
0.0.0.0 192.168.0.103 2222 3389
1.2.3.4 80 192.168.0.10 80

Explain (0.0.0.0 native binding indicates all available addresses)
of all requests sent to port 8080 of the unit 8080 forwarded to the port 172.19.94.3
forward all requests to port 2222 of the machine 3389 to 192.168.0.103 port
forwards all requests destined 1.2.3.4 port 80 to port 80 of 192.168.0.10

Start a program
pkill rinetd ## shutdown process
/ usr / sbin / rinetd ## starts forwarding
this command which can be added to /etc/rc.local to start automatically

View the status
netstat -antup

Note that
in the present binding machine 1.rinetd.conf port must not be used by another program
2. Run rinetd firewall system should be opened local port bound
example:
-A-Firewall-RH. 1 the INPUT -m-State - NEW -m -p TCP TCP -state --dport 1111 -jACCEPT
-A RH-Firewall-State. 1---state the INPUT NEW -m -m -p TCP TCP --dport 2222 -jACCEPT

Guess you like

Origin blog.51cto.com/14648397/2481492