Pitboss and NAT stupidity

transpetaflops

Chieftain
Joined
Dec 29, 2005
Messages
4
Yesterday I dusted off my Civ4 DVD and tried to set up a Pitboss MP game with a friend, something I've done before but not with the latest patch. I immediately ran into the "Peer connection failure" error that has been discussed in several threads here already. Not finding a clear solution I dug a little deeper and found the following:

First the setup:
Peer A behind router A NAT:ed. Port 2056 UDP forwarded.
Peer B behind router B NAT:ed. Port 2056 UDP forwarded.
Pitboss behind router A NAT:ed. Running on separate PC and using port 2057. Port 2057 UDP forwarded.

Peer B can connect to Pitboss without any trouble but when peer A tries to connect to Pitboss simultaneously it also wants to connect to peer B and fails with "Peer connection failure". Sniffing the network reveals that peer A tries to connect to peer B with it's private IP address and this will ofcourse fail miserably. The only way peer A can know the private address of peer B is through data exchange with the Pitboss server itself. What in God's name is Firaxis up to here?! This idiotic way of writing network code has plagued ftp and h.323 for ages but to their defense they we're created before NAT was invented. This should NOT be an issue with a modern game created during the last 10 years.

Questions:

1) In what patch was this flaw introduced?

2) Is there a setting to change Pitboss' behaviour or a workaround that doesn't involve setting up a VPN?

3) Are Firaxis aware of this problem?

Regards
PP

(really angry for not being able to play MP ATM)
 
1) It's been there from the beginning.

2) Not that I know of. I recommend trying out Hamachi as that will probably solve your problems. It is a VPN, but a very very easy one to set up.

3) I am not sure. I assume that they do know, but it's so deeply integrated in to their netcode that they will not fix it. Just a guess.


I run a setup very similar to you. Here's what I have:
Peer A behind Router A, no ports are forwarded.
Peer B behind Router B, no ports are forwarded.
Pitboss Server behind Router A, port 2056 UDP+TCP forwarded.

Peer B can connect to the server fine. When I (Peer A) connect to the server, it successfully connects to Peer B and we can play fine.

I have no idea why it works for me like this, but it does. You might want to try changing your server to run on teh default (2056) port and stop forwarding to Peer A's computer. I'm not sure why this would work, but it's worth a shot.
 
Thanks for your input OverloadUT. I know for sure that I ran the setup just like you describe it with version 1.52 and we could all play then. I just don't remember seeing each client connecting to every other client back then. If the behaviour were identical in that version it wouldn't have worked. There's no way you can connect to the other peers with their private IP addresses so something must have changed. Are you running 1.61 both on the clients and on PitBoss with your setup?
 
Yep, we're all running 1.61. Our game started on 1.52 but we updated to 1.61 when it came out.

Are you sure it's not just attempting to connect to the private IP first, and then the public IP? I've seen systems that use that method before.
 
No attempts at all to connect to public IP. Only 20-30 attempts on internal IP and then I get "Peer connection failure".
I switched the roles around and ran Pitboss on one of my friend's computers. The same result there, client trying to connect to my private IP. But to make matters worse... I have two NICs in my PC - one regular and one integrated to my satellite reception card (Internet via satellite). It isn't active but it's configured with a private IP from another subnet. THIS is the IP Civ4 tries to connect to from my friend's installation. The netcode in Civ4 is a joke...
 
Top Bottom