Playing through GamespyArcade or In-game menu
To Join a game: According to the Gamespy FAQ (and the PTW readme - thanks Shou), the following ports must be opened.
6667 (IRC)
3783 (Voice Chat Port)
27900 (Master Server UDP Heartbeat)
28900 (Master Server List Request)
29900 (GP Connection Manager)
29901 (GP Search Manager)
13139 (Custom UDP Pings)
6500 (Query Port)
2302 (DirectPlay - UDP)
To Host a game: Your ISP (and your firewall) must allow you to act as server on the following ports:
13139 (Custom UDP Pings)
6500 (Query Port)
2302 (DirectPlay - UDP)
Playing a Direct IP game
To Join a game: You must know the IP adress of the host, and the following port must be opened
2302 (DirectPlay - UDP)
To Host a game: The following ports must be opened and your ISP and Firewall must allow you to act as server on these ports.
13139 (Custom UDP Pings)
6500 (Query Port)
2302 (DirectPlay - UDP)
Port 80 has been removed from the lists, as it seems it is unecessary after all. It has also been removed from the PtW readme.
Port 6515 has also been removed, as 2302 is now being used for DirectPlay.
References and Thanks:
http://forums.civfanatics.com/showthread.php?t=35588
http://www.gamespyarcade.com/helpers/workshop/routers/
http://www.gamespyarcade.com/support/firewalls.shtml