端口转发映射的程序叫rinetd,直接make编译安装即可。

wget https://github.com/boutell/rinetd/archive/master.zip && unzip master.zip && cd rinetd-master
sed -i 's/65536/65535/g' rinetd.c (修改端口范围)
mkdir /usr/man&&make&&make install
vi /etc/rinetd.conf
0.0.0.0 6379 Redis 的链接地址 6379
 logfile /var/log/rinetd.log

执行如下命令启动 rinetd

rinetd

您可以通过 echo rinetd >>/etc/rc.local 将 rinetd 设置为自启动。
若遇到绑定报错,可以执行 pkill rinetd 结束进程,再执行 rinetd启动进程 rinetd。
rinetd 正常启动后, 执行netstat -anp | grep 6379 确认服务是否正常运行。

相关文章:

  • 2021-10-14
  • 2022-02-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2021-12-05
  • 2021-10-07
  • 2021-12-05
猜你喜欢
  • 2021-11-01
  • 2021-09-20
  • 2021-11-23
  • 2021-06-26
  • 2021-07-23
  • 2021-12-18
相关资源
相似解决方案