Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Rinetd, a simple and useful port mapping forwarding tool under linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Rinetd, a simple and easy to use tool under linux, to achieve port mapping / forwarding / redirection.

Link: https://pan.baidu.com/s/1F6Jx5voWCiS1lYa39uMWyQ

Extraction code: 0xgq

Install rineted on the 192.123.55.132 server

Support for linux6 linux7 operating system

1. The rinetd software is the rpm package.

Rpm-ivh rinetd.rpm

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

Explain (0.0.0.0 indicates that all available addresses are bound locally)

Forward all requests to port 8080 on this machine to port 8080 of 172.19.94.3

Forward all requests to port 2222 on this machine to port 3389 of 192.168.0.103

Forward all port 80 requests to 1.2.3.4 to port 80 of 192.168.0.10

Vi / etc/rinetd.conf

192.123.55.132 6666 192.168.33.131 1521

If port 1521 with the address of 192.168.33.131 is forwarded to port 192.123.55.132 6666, all access to 192.123.55.132 6666 is equivalent to 1521 of 192.168.33.131.

The command format is

Bindaddress bindport connectaddress connectport

Bound address bound port bound address connected port

Or

[Source Address] [Source Port] [Destination Address] [Destination Port]

Source address source port destination address destination port

Startup program

Pkill rinetd # # shut down the process

Rinetd-c / etc/rinetd.conf # # start forwarding

Add this command to / etc/rc.local and you can turn it on and run automatically.

View statu

Netstat-antup

Need to pay attention to

The native port bound in 1.rinetd.conf must not be occupied by other programs

two。 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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report