https://github.com/samhocevar/rinetd

不多介绍了,超好用的高性能端口转发工具。

不废话解释每一步,自己顺着运行吧。

 

apt install make automake gcc wget -y

wget https://github.com/samhocevar/rinetd/releases/download/v0.73/rinetd-0.73.tar.gz

tar -xvf rinetd-0.73.tar.gz

cd rinetd-0.73

apt install make automake gcc

./bootstrap

./configure

make

make install

 

如果你需要注册为服务:

nano /etc/systemd/system/rinetd.service

填入下面的内容,其中/root/rinetd.conf改为你的配置文件的位置。

[Unit]
Description=Start rinetd on boot

[Service]
ExecStart=/usr/local/sbin/rinetd -c /root/rinetd.conf

[Install]
WantedBy=default.target

 

sudo systemctl daemon-reload
sudo systemctl enable rinetd
sudo systemctl start rinetd

sudo systemctl status rinetd.service