网络中转工具 NAT-Rinted安装及应用

在工作中使用了种NAT工具,我发现在Linux下使用Rinted工具非常便捷好用,先把安装步骤简单写一下,方便记忆。

安装步骤:

1. 下载、解压、安装

[root@zhenyunode zhenyutest]# cd ~/zhenyutest/
[root@zhenyunode zhenyutest]# wget http://www.boutell.com/rinetd/http/rinetd.tar.gz
[root@zhenyunode zhenyutest]# tar -xvf ~/zhenyutest/rinetd.tar.gz
[root@zhenyunode zhenyutest]# cd ~/zhenyutest/rinetd/
[root@zhenyunode rinetd]# sed -i 's/65536/65535/g' rinetd.c
[root@zhenyunode rinetd]# mkdir /usr/man/
[root@zhenyunode rinetd]# make && make install
[root@zhenyunode rinetd]#

2. 创建配置文件

下面是配置实例:

0.0.0.0 40001 10.0.0.3 9182
0.0.0.0 40002 10.0.0.4 9182
0.0.0.0 40003 10.0.0.5 9182
0.0.0.0 40005 10.0.0.11 9182
0.0.0.0 40006 10.0.0.12 9182
0.0.0.0 40007 10.0.0.13 9182
0.0.0.0 40008 10.0.0.14 9182                           

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

3. 启动关闭程序

启动:
[root@zhenyunode rinetd]# rinetd -c /etc/rinetd.conf
[root@zhenyunode ~]# ps -ef | grep rinetd
root     27346 27300  0 12:34 pts/1    00:00:00 grep --color=auto rinetd
root     32186     1  0 5月16 ?       00:00:00 rinetd -c /etc/rinetd.conf

停止:
[root@zhenyunode rinetd]# killall rinetd

4.校验

root@zhenyunode rinetd]# netstat -tanulp|grep rinetd
tcp        0      0 0.0.0.0:8080           0.0.0.0:*               LISTEN      32186/rinetd  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

garagong

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值