For a forum that prides itself on trying new things, for the love of all that is novel and interesting, please can we have a new QotM? - Krill

Create an account  

 
The old NatNeg thread - How to avoid bouncing in Pitboss (without Gamespy)

EDIT: For current information on the active NatNeg and Lobby server hosted by Zulan, see this thread.

After Gamespy shut down their servers people have been unable to connect simultaneously to Pitboss games. They "bounce" and are told that the peers don't have their firewalls configured correctly.

The reason for this problem is that Gamespy shut down their NAT Negotiation (NatNeg) servers which were needed to establish connections between players. We now have a working replacement.

How to avoid bounces:
You need to modify your windows hosts file to redirect requests to Gamespy's NatNeg servers to the replacement server, currently hosted by Zulan.

Run a text editor as administrator, and open the file C:\Windows\System32\drivers\etc\hosts.

Add the following four lines to the hosts file, and save it. You should overwrite the existing file, which should be named "hosts" with no file extension, so not "hosts.txt".
Code:
148.251.130.188 civ4bts.natneg1.gamespy.com
148.251.130.188 civ4bts.natneg2.gamespy.com
148.251.130.188 civ4bts.natneg3.gamespy.com
148.251.130.188 civ4bts.available.gamespy.com

In pictures:
[Image: runasadmin.jpg]

[Image: fileopen.jpg]

[Image: fileopen2.jpg]

(This last screenshot shows the wrong IP address, it has changed since the screenshots were takensmile

[Image: filesave.jpg]

That's it! You are now able to connect to other players who have applied the same fix to their computers. You don't need to change your NetComm port in civilization.ini, configure port forwarding on your router, or any such stuff. Connecting to other players should work just as well as it did prior to Gamespy's shutdown.
I have to run.
Reply

This is the source code for the NatNeg replacement:
https://github.com/novice-rb/PRMasterServer

This is a description of how the NAT negotiation algorithm that Gamespy uses works, and it was used as a specification for the NatNeg replacement.
http://wiki.tockdom.com/wiki/MKWii_Netwo...dowifi.net
It seems to be correct, at least implementing it yielded a working replacement server.

Here is Gamespy's description of its NAT Negotiation scheme, lifted from the Wayback machine. Gamespy's pages are now unavailable.
Read my copy or read it in the Wayback machine.
I have to run.
Reply

Wow, I can't believe y'all actually figured out a solution to this!! Awesome job, thanks so much Novice and everyone else!
Reply

Nice work guys. toast

During testing I had this line in my HOSTS file, is it needed at all on the client side or was it only for the pitboss server?

Code:
127.0.0.1        motd.gamespy.com

Edit: The only purpose of that localhost redirection was to keep the pitboss.exe from freezing while waiting for the remote server call to fail.

Played: Pitboss 18 - Kublai Khan of Germany Somalia | Pitboss 11 - De Gaulle of Byzantium | Pitboss 8 - Churchill of Portugal | PB7 - Mao of Native America | PBEM29 Greens - Mao of Babylon
Reply

Yeah, that line is not needed on the client, Xenu.
I have to run.
Reply

bow
Reply

I'm impressed!

As I understand it, that fix will work as long as you're hosting your NATNeg server? But presumably anyone could host one, like a Pitboss host, it would just change the IP address at the front of each line?
EitB 25 - Perpentach
Occasional mapmaker

Reply

What information is being sent to those servers? Is there an easy way the server could create an automated list of who has set their hosts file correctly (only by username if that's sent--I wouldn't want a list of just IP addresses)
Reply

CH, I think the logging that would enable matching player names to IP addresses would be the pitboss logging, not the NatNeg application. Although if both of those servers are being hosted (and logged) on the same machine, it seems like it would be possible to gather data from both and combine them for some purpose, such as the one you've suggested. I'm not a programmer though so we're talking about someone else's time, so "easy" is not for me to define!

Played: Pitboss 18 - Kublai Khan of Germany Somalia | Pitboss 11 - De Gaulle of Byzantium | Pitboss 8 - Churchill of Portugal | PB7 - Mao of Native America | PBEM29 Greens - Mao of Babylon
Reply

(August 7th, 2014, 14:36)Mardoc Wrote: I'm impressed!

As I understand it, that fix will work as long as you're hosting your NATNeg server? But presumably anyone could host one, like a Pitboss host, it would just change the IP address at the front of each line?

Yeah, anyone could host one, and it requires almost no server resources. I'm not hosting this one, by the way - Caledorn is. Of course, everybody needs to use the same NatNeg server to avoid bounces.

@Cheater Hater: The NatNeg server only knows the IP addresses and a clientid of the players using its services. It's possible to cross-reference the clientid with the pitboss server's log files to find user names, but the NSA isn't paying me enough to do that.
I have to run.
Reply



Forum Jump: