Author Topic: WAN/LAN Lobby Server Connection Question  (Read 2737 times)

GabaLaba

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 11
    • View Profile
WAN/LAN Lobby Server Connection Question
« on: September 08, 2017, 07:24:08 PM »
Hello,
Sorry for posting another thread so soon after my last, I really am a newbie with TNet.

I am having this strange problem with connecting to my server lobby. I can connect perfectly fine when I use the local IP to connect to it, however if I use the public IP to connect to it (and from the same machine) it says "Unable to Connect" in the console for me.

I forwarded TCP Ports as the Server Lobby is TCP, and I have tried both UDP and TCP/UDP as well to see if that would make a difference.

This is the command that I have to run the lobby server:
  1. @echo off
  2. start "TNet 3 Lobby Server Test" "TNServer.exe" -name "TNet_TestLobbySrv" -tcpLobby 5129

This is what I have in my script where I try to connect to the lobby server after hosting a new server:
  1.         TNServerInstance.serverName = serverName;
  2.         TNServerInstance.Start(5127, 5128, null, TNServerInstance.Type.Tcp, Tools.ResolveEndPoint("192.168.1.2", 5129));

I am also trying to connect to it through the TN Tcp Lobby Client script (gyazo link): https://gyazo.com/7058620018844d4aa0f8cf3498e414dc?token=63bcb47e34a3ab81912d1034b779a8e4

Thanks,
Gabe

cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: WAN/LAN Lobby Server Connection Question
« Reply #1 on: September 08, 2017, 07:38:38 PM »
Looks fine to me. You should be able to connect to either 192.168.1.2 or 127.0.0.1. You won't be able to connect using your WAN IP from the same LAN because of router hairpinning.

GabaLaba

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 11
    • View Profile
Re: WAN/LAN Lobby Server Connection Question
« Reply #2 on: September 08, 2017, 08:21:00 PM »
Thank you, I did not know about router hairpinning until now