Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4149568
  • 博文数量: 447
  • 博客积分: 1241
  • 博客等级: 中尉
  • 技术积分: 5786
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-27 06:48
个人简介

读好书,交益友

文章分类

全部博文(447)

文章存档

2023年(6)

2022年(29)

2021年(49)

2020年(16)

2019年(15)

2018年(23)

2017年(67)

2016年(42)

2015年(51)

2014年(57)

2013年(52)

2012年(35)

2011年(5)

分类: LINUX

2014-06-04 19:09:05

最近经常需要临时的开放端口,经常用到端口映射工具。
1 rinetd 我是用最多的工具,同时支持windows和linux,可以后台运行。
配置文件在 /etc/rinetd.conf,或者-c指定。
格式 bindaddress bindport connectaddress connectport
例如 0.0.0.0 23 10.1.1.2 23
2 Socat 功能最强大的工具,可以支持串口,只支持命令行。
socat TCP-LISTEN:443,fork TCP:192.168.30.167:443
3 redir 功能最简单的工具
redir --lport=445 --caddr=192.168.30.167--cport=443
4 xinted
使用xinted是最简单的方式
service mysql-portmap {
    id = 1
    disable = no
    type = UNLISTED
    socket_type = stream
    protocol = tcp
    wait = no
    redirect = 10.33.66.88 3306
    bind = 183.68.36.138
    port = 2669
    user = nobody
    group = nobody
    flags = NODELAY KEEPALIVE NOLIBWRAP IPv4
    log_type = FILE /data/log/xinetd/tcp-portmap.log
    cps = 100 30
}
阅读(3760) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~