LinuxSir.cn,穿越时空的Linuxsir!

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

我架了一个CS 服务器。。有独立IP 版本是RH9 用Iptables映射到外网,请各位指点。

[复制链接]
发表于 2005-10-5 05:52:51 | 显示全部楼层 |阅读模式
#!/bin/bash
# load module
modprobe ip_tables
modprobe ip_nat-ftp

# star firewall service with deny all Iptables
iptables -F
iptables -F -t nat
iptables -X
iptables -X -t nat
iptables -P INPUT DROP
iptables -P FORWARD ACCEPT
iptables -P OUTPUT DROP

iptables -A INPUT -i eth1 -j ACCEPT
iptables -A OUTPUT eth0 -j ACCEPT

#CS IP nat
iptables -t nat -A PREROUTING -i eth0 -d a.b.c.d --dsport 27015 -j dnat --to 192.168.1.251:27015
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.1.251 --sport 27015 -j snat --to a.b.c.d:27015


iptables -t nat -A POSTROUTING -s 192.168.0.0/23 -o eth0 -j MASQUERADE

                                                                                请各位指点。
 楼主| 发表于 2005-10-9 05:26:37 | 显示全部楼层
这是第一次用iptalbles 希望各位多指点。
回复 支持 反对

使用道具 举报

发表于 2005-10-9 12:39:56 | 显示全部楼层
这东东不熟悉都是用
http://muse.linuxmafia.org/gshield/
http://www.simonzone.com/software/guarddog/

CS服务器需要映射
http://forums.unitedadmins.com/index.php?showtopic=35684

Note 2: The full ports are (src from thread below)
27010 - 27012 / UDP
5273 - 5273 / TCP
7002 - 7002 / TCP
27020 - 27020 / BOTH
27015 - 27015 / UDP
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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