目 录CONTENT

文章目录

CentOS7 下端口转发rinetd

过客
2019-10-17 / 0 评论 / 0 点赞 / 8 阅读 / 0 字

1、下载,解压,安装

$ wget http://www.boutell.com/rinetd/http/rinetd.tar.gz&&tar -xvf rinetd.tar.gz&&cd rinetd
$ sed -i 's/65536/65535/g' rinetd.c (修改端口范围)
$ mkdir /usr/man&&make&&make install

创建配置文件

配置文件格式很简单:[Source Address] [Source Port] [Destination Address] [Destination Port]

如:将本地8080端口转发192.168.31.22:8080

vi /etc/rinetd.conf

0.0.0.0 8080 192.168.31.22 8080
logfile /var/log/rinetd.log

3、启动、关闭程序

$ rinetd -c /etc/rinetd.conf
ps -ef | grep rinetd

$ killall rinetd

4、校验

$ netstat -tanulp|grep rinetd
0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin

评论区