Here's a break down of what ports go to each program on the server side:
Port Protocol Program Name Program Description
23 TCP bnetd Telnet Connection Support
4000 TCP d2gs Diablo II Closed Game Server
6112 TCP/UDP bnetd Basic Battle.net (TM) Chat & Game Initialization
6113 TCP d2cs/d2closed Diablo II Realm Server
6114 TCP d2dbs/d2closed Diablo II Database Server
6114 UDP bntrackd Tracking Daemon for Producing Stats
6200 TCP bnetd Warcraft III Router
6667 TCP bnetd IRC Connection Support
Here is a break down of what games uses what port on the client side:
Game Name Port Number(s)
Warcraft II Battle.net (TM) Edition (BNE) 6112
Warcraft III Reign of Chaos 6112, 6200
Starcraft 6112
Starcraft Brood War 6112
Diablo 6112
Diablo II Open Battle.net (TM) 6112
Diablo II Closed Battle.net (TM) 6112, 4000