Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Sending to people outside LAN  (Read 2053 times)

0 Members and 1 Guest are viewing this topic.

Gerit

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Sending to people outside LAN
« on: May 24, 2015, 04:14:17 pm »
I have been using SFML for maybe half a year, but I finally decided to use UDP Sockets. Using a simple-ish server and a simple-ish client, I've managed to create a fun LAN shooting game. But now I'm trying to let others play it, and I can't pinpoint the issue. Sent packets never arrive, even though my server is port forwarded. I've even tried asking my friend who is testing for me to port forward his game but the client and the server don't manage a connection. Why can't our programs connect?

Edit: Fixed it, router had to be port forwarded in another router.
« Last Edit: May 24, 2015, 04:50:40 pm by Gerit »

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Sending to people outside LAN
« Reply #1 on: May 24, 2015, 04:20:52 pm »
I'd use wireshark on both ends to see what's going on.
There could be a million reasons why packets don't get through, like;
- OS firewalls at each end.
- NAT routers dropping packets.
- The simple nature of UDP being an unreliable protocol.
- Coding errors.
- Failure to use publicly routable addresses (using private ones like 192.168.x.x instead).
And many more...
« Last Edit: May 24, 2015, 04:25:38 pm by Jesper Juhl »

Gerit

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Sending to people outside LAN
« Reply #2 on: May 24, 2015, 04:35:38 pm »
I'm not used to this tool, but as far as I can see it only sends to the public IP, it doesn't seem to arrive back. So I'll assume it's a problem with router settings.