Chinaunix首页 | 论坛 | 博客
  • 博客访问: 520591
  • 博文数量: 102
  • 博客积分: 950
  • 博客等级: 准尉
  • 技术积分: 1094
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-28 16:07
文章分类

全部博文(102)

文章存档

2020年(2)

2016年(5)

2015年(15)

2014年(25)

2013年(18)

2012年(19)

2011年(18)

我的朋友

分类: LINUX

2011-04-08 11:58:33

主题:LINUX下使用rinetd端口转发-发布应用

1)安装软件rinted

下载

tar xvzf rinetd.tar.gz    #解压程序

编译安装

make

make install

2)编辑配置文件

vi /etc/rinetd.conf
59.33.120.36 80 192.168.0.72 80
allow 59.33.120.*
logfile /var/log/rinetd.log

3)运行

rinetd -c /etc/rinetd.conf

4)查看端口
netstat –antup

———-

端口转发映射的程序叫rinetd,启动方法rinetd -c /etc/rinetd.conf 。

把1.1.1.1的11端口映射到2.2.2.2的3389端口,配置文件如下

[root@localhost iso]# cat /etc/rinetd.conf
1.1.1.1 11 2.2.2.1 3389
1.1.1.1 12 2.2.2.2 3389
1.1.1.1 13 2.2.2.3 22
1.1.1.1 14 2.2.2.4 80
allow *.*.*.*
logfile /var/log/rinetd.log

要说iptables也能实现,但不清楚具体的命令是啥,这个链那个链的,我对iptables一直都不感冒

阅读(1652) | 评论(0) | 转发(0) |
0

上一篇:linux 终端乱码

下一篇:青春 老男孩

给主人留下些什么吧!~~