Author Topic: NAT Traversal help  (Read 4269 times)


  • Not-a-newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
NAT Traversal help
« on: August 23, 2013, 07:54:09 AM »
I am trying to create a peer to peer connection using NAT punchthrough and having problems.  Here's how I'm doing it.

One PC acts as a Server (ServerPC)
One PC acts as a Client (ClientPC)

ServerPC -
Creates a peerInterface.
starts the peer interface (2, new socket descriptor, 1)
sets maximum connections to 2
attaches the natpunchthrough client
connects to the facilitator server
When connection is succesfull Shows the Sytem GUID

ClientPC -
Creates a peerInterface
starts the peer interface (1, new socket descriptior, 1)
attaches a nat punchtrhough client
connects to the facilitator server.
When connection is successful calls OpenNat - passing in the systemGUID. from ServerPC

At this point I get a ID_NAT_PUNCHTHROUGH_SUCCEEDED on ClientPC and ServerPC

on ClientPC I try to connect to the server using the ip and port in the packet but this fails. 

Any ideas where I am going wrong?


  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: NAT Traversal help
« Reply #1 on: September 12, 2013, 09:20:44 AM »
You need 2 client PCs, and the system will connect 2 client PCs. You don't need it to connect to the server.