[EDIT: SEE IMPORTANT EDITS AT THE END OF THIS POST]
I don't think it's possible to both host a game using PitBoss and play in it at the same time, if you have only one IP address and you're using NAT (unless you're hosting a LAN party and *all* your players are inside the NAT).
here's my hypothesis:
1. Civ4 is a peer-to-peer game (at least when played in Direct IP mode).
2. PitBoss is a peer that controls only the AI players (if any) and handles the saving of games.
3. All peers must use the same UDP port (2056) and there is no way to override this.
the implication of the above is that every participant in the game must have a unique IP address and UDP port pair. since the UDP port can't be changed, this means that every participant must have a unique IP address reachable by every other participant. "participant" includes the PitBoss server itself.
if you have only one public IP address, which you share among multiple machines using NAT, then you cannot possibly have two machines up at the same time that are both reachable by every other participant -- only one of the two machines can be 'bound' to port 2056 on your NAT router.
the only solution I can think of for this problem is to run a VPN server (such as
OpenVPN), and require that all participants in the game play the game tunneling their traffic through the VPN. in this way, you can give each participant a unique IP address reachable by every other participant, even if one or more of the participants are sharing an IP address on the 'public' Internet.
the obvious solution, of course, is for Firaxis to patch the client and PitBoss to allow arbitrary ports to be specified. at a minimum, PitBoss needs to be able to listen on any port, and the clients need to be able to specify the server port (so that a player with one IP address can both host and play at the same time) and the clients also need to be able to override their own port (so that multiple players who are sharing a single IP address can play at the same time). this would require the peer-to-peer protocol to be updated, of course -- the server would have to inform newly connecting players of both the IP address *and* port of each of the existing players (I assume that, right now, the server sends IP addresses only, and the port is assumed to be 2056 in all cases).
I haven't tested the VPN solution yet, but I'm figuring it should work.
-ken
[EDIT: for those of you reading this thread late, it turns out that assumption #3 above is false. it is possible to change the port on any client, and on the PitBoss server as well. read the rest of the thread to find out how. the result of this is that it is in fact possible for multiple players to share an IP address, and that it works fine. the "obvious solution" above, listing a number of required patches, is unnecessary -- all of those features are already present in Civ4 and in PitBoss.]