Linux port ing tool RINETD and port rining rinetd

Source: Internet
Author: User

Linux port ing tool RINETD and port rining rinetd

Rinetd, a simple and easy-to-use tool in Linux, implements port ing, forwarding, and redirection.
Official Website address http://www.boutell.com/rinetd

Software Download
Wget http://www.boutell.com/rinetd/http/rinetd.tar.gz

Unzip and install
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 the local machine is bound to all available addresses)
Forward all requests sent to port 8080 of the Local Machine to port 8080 of port 172.19.94.3
Forward all requests sent to port 2222 of the Local Machine to port 3389 of 192.168.0.103.
Forward all port 80 requests sent to port 1.2.3.4 to port 80 of 192.168.0.10.

Command Format is
Bindaddress bindport connectaddress connectport
The port to which the bound address is connected
Or
[Source Address] [Source Port] [Destination Address] [Destination Port]
Source Address Source Port Destination Address destination port

Start the program
Pkill rinetd # Shut down the process
Rinetd-c/etc/rinetd. conf # start forwarding
Add this command to/etc/rc. local to run automatically upon startup.

View status
Netstat-antup

Note:
1. The local port bound to rinetd. conf must not be occupied by other programs.
2. The system firewall running rinetd should open the bound local 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

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.