LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2643|回复: 8

请教传奇私服映射,端口7000.7100.7200

[复制链接]
发表于 2004-7-14 22:09:38 | 显示全部楼层 |阅读模式
如题:
请高手指点,小弟先谢谢了!
发表于 2004-7-15 15:57:31 | 显示全部楼层
传奇服务器设定监听外网ip,网关映射端口

例:外ip = x.x.x.x 传奇服务器ip = y.y.y.y

在外网卡上 访问 x.x.x.x:7000 --> y.y.y.y:7000

(内部环回,使内网用户也能用x.x.x.x 登陆)在内网卡上 访问 x.x.x.x:7000 --> y.y.y.y:7000


这是最好的解决办法,所有网络游戏都如此解决。其他端口同上。
发表于 2004-7-15 17:35:41 | 显示全部楼层

  1. INET_IP=222.222.222.222
  2. GAME_IP=192.168.0.222
  3. LAN_IP=192.168.0.1

  4. for dport in 80 7000 7100 7200 ; do
  5.   iptables -t nat -A PREROUTING  --dst $INET_IP -p tcp --dport $dport -j DNAT --to-destination $GAME_IP
  6.   iptables -t nat -A POSTROUTING --dst $HTTP_IP -p tcp --dport $dport -j SNAT --to-source      $LAN_IP
  7.   iptables -t nat -A OUTPUT      --dst $INET_IP -p tcp --dport $dport -j DNAT --to-destination $GAME_IP
  8. done
复制代码
发表于 2004-7-16 07:25:45 | 显示全部楼层
可以多开一个吗?
有谁可以帮助一下
 楼主| 发表于 2004-7-16 12:43:57 | 显示全部楼层
请问一下:iptables -t nat -A OUTPUT      --dst $INET_IP -p tcp --dport $dport -j DNAT --to-destination $GAME_IP是针对局域网内部的吗?指点
发表于 2004-7-16 14:39:47 | 显示全部楼层


  1. GAME_IP=192.168.0.222
  2. LAN_IP=192.168.0.1

  3. for INET_IP in 222.222.222.222 333.333.333.333 ; do
  4. for dport in 80 7000 7100 7200 ; do
  5.   iptables -t nat -A PREROUTING  --dst $INET_IP -p tcp --dport $dport -j DNAT --to-destination $GAME_IP
  6.   iptables -t nat -A POSTROUTING --dst $GAME_IP -p tcp --dport $dport -j SNAT --to-source      $LAN_IP
  7.   iptables -t nat -A OUTPUT      --dst $INET_IP -p tcp --dport $dport -j DNAT --to-destination $GAME_IP
  8. done
  9. done
复制代码

output 是针对firewall 本身的
 楼主| 发表于 2004-7-16 14:47:47 | 显示全部楼层
Nov 2003大哥,我有点儿二胡了,可以解释一下你的思路吗?最好详细点儿,小弟刚入门,不要见笑!~
发表于 2004-7-16 15:11:07 | 显示全部楼层
发表于 2004-7-18 20:39:18 | 显示全部楼层
最初由 linfly 发表
可以多开一个吗?
有谁可以帮助一下


用xbird的方法继续填加下去
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表