The easy-to-use port mapping and forwarding tool under Linux rinetd

Source: Internet
Author: User

Easy-to-use tool rinetd under Linux for port mapping/forwarding/redirection
Official Address http://www.boutell.com/rinetd



Software download
wget http://www.boutell.com/rinetd/http/rinetd.tar.gz

Unzip the installation
Tar zxvf rinetd.tar.gz
Make
Make install

Edit Configuration
Vi/etc/rinetd.conf
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

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.

View status
Netstat-antup

Need to be aware
The native port bound in the 1.rinetd.conf must not be occupied by another program
2. The system firewall running rinetd should open the bound native port
For example:
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 1111-j ACCEPT
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 2222-j ACCEPT

The easy-to-use port mapping and forwarding tool under Linux rinetd

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.