-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to connect server and clients if they are behind NATs? #31
Comments
It seems port forwarding using UPnP/IDG might be the easiest possible solution if the router supports it. |
I don't think this is something we need to worry about. As long as the program opens the port and maybe reports the port and IP address, we can leave the rest to the users. Works for Minecraft. |
What tools do users of Minecraft use to implement port forwarding? If there are convenient tools out there, I agree that we don't need to do that ourselves. A little recipe for how to use them might be worth an entry in the FAQ. Getting the public IP is actually something we do not have yet. The network code only delivers the local IP if behind a NAT. But there is for example ipgetter. |
I mean, I wouldn't go so far as to say that there are convenient tools... When I've set up servers I just set up ports at the router level since I run the network. Bigger servers are usually run on remote servers that have setup like that built in. I guess I shouldn't talk about it like it's a solved problem, but it's something that many users can handle on their own, so I wouldn't worry about it for now. But if there's a way to do it with UPnP or something similar, and a use for that kind of mechanism in testing, it might be worth trying. |
Okay. As a first step, I displayed the "real" IP address using ipgetter. The rest is for later. |
I'm not an expert on this but it needs to be solved in order to allow multiplayer games.
The question is how two peers behind routers/network address translations discover and connect to each other? See for example: https://en.wikipedia.org/wiki/Network_address_translation#Type_of_NAT_and_NAT_traversal.2C_role_of_port_preservation_for_TCP
The text was updated successfully, but these errors were encountered: