Topic: NAT Punch Through with Ruby on Rails
I'm building a multiplayer game and I'm using Ruby on Rails to build my lobby server, which registers/unregisters active game servers (IP & Port). When someone loads my game, the game will query my Lobby Server for the list of active game servers they can join. The player can either join a game in the list or create a new game server and wait for people to join. Again, the only information I need to allow a player to join an existing game server is the IP and Port of the game server. This all works fine when running on the same LAN, but it breaks when the server is behind a NAT device because the IP and Port of the server isn't accessible by computers outside the NAT.
After doing research on this, I found this is a typical problem with internet multiplayer games and the solution is implementing a NAT Punch Through. As I understand it, all that is needed is an "introducer" server that can manage the information needed for a client to connect with the server that is behind the NAT. And as I understand that, that information would simply be the IP and Port of the NAT device. Then the players that wish to join the game server, that's behind the NAT, can simply use the IP and Port of the NAT device and the NAT device should automatically forward the packets to the game server. Is that (kinda) right?
If so, how can I get the IP and Port of the NAT device? If not, what information do I need to implement a NAT Punch Through solution using Ruby on Rails?
Thanks so much for your wisdom!
Last edited by beachrunnerjoe (2011-11-19 17:54:21)