|
发表于 2004-4-9 10:11:27
|
显示全部楼层
来自 中国–北京–北京
呵呵, 可能大家有点误解.
你的HLDS应该是运行在LAN上. 它是没有什么外网IP的.
路由器上有两个口, 一个接在LAN, 一个接ADSL. ADSL口上是有外网IP的.
现在需要做的是:
HLDS运行起来, 比如说IP是 192.168.0.4
路由器上外网IP比如说是 202.96.0.222, 那么在路由器上要加端口映射
所有访问 202.96.0.222:27015 的, 直接映射到 192.168.0.4:27015
对外宣传你的服务器地址就是 202.96.0.222:27015
这样你的服务器LAN上 和INTERNET上都能访问.
当然, 如果想让INTERNET用户搜索到你的服务器, 还有开放更多的端口,
CS用到的端口
Client
======
TCP 6003:
Outgoing connectivity to this port on remote destinations. Used for
chat in the HL browser.
UDP 27011:
Outgoing connectivity to this port on remote destinations. Used for the
'custom game' mod browser.
UDP 27005:
Incoming connectivity to this port (or whatever port the client has
changed this to, if not using the default). Used for game traffic
(including voice) between client and server.
Server
======
TCP 7002:
Outgoing connectivity to this port on remote destinations. Used for WON
auth.
UDP 27010:
Outgoing connectivity to this port on remote destinations. Used for
advertising a server on the master lists for server browsers.
UDP 27011:
Communicating with the BanList Server from YOUR Server
Was formerly 27013 - much in/out traffic too
UDP 27015:
Incoming connectivity to this port (or whatever port the server had been
changed to, if not the default). Used for all client/server game
traffic (including voice), server info requests, etc. |
|