Networking over the Internet
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Networking over the Internet
I'm trying to get started with networking, and I'm running into quite a few issues. I created a networking manager class using lua-enet, and it functions correctly when bound to different ports on the loopback address (127.0.0.1). However, any attempt to establish a connection between two different clients over the internet seems to fail. I assume that this is attributable to the limitations of UDP and router based networking. If so, it seems as though I would need a NAT punchthrough. If so, this would require a server accessible from both clients, with proper networking setup for the operation. Is there any way to accomplish this? Is LuaSocket less restricted than lua-enet? Am I completely wrong in my assumptions? Any information is helpful.
Re: Networking over the Internet
I'm not sure if it's your issue, but are you binding to 127.0.0.1? if so, you can't connect from the outside; you need to bind to 0.0.0.0 or to your interface's IP address (on Linux, use ifconfig to find out which one it is, on Windows, use ipconfig, on OSX I have no idea).
You should be able to configure your router to forward TCP and/or UDP packets that come to a certain port, to any given IP and port (in this case your machine's local network IP; the WAN and LAN ports may be the same and that's commonly the case). I've seen that option called Virtual Servers in some routers; Port Redirection in others.
You should be able to configure your router to forward TCP and/or UDP packets that come to a certain port, to any given IP and port (in this case your machine's local network IP; the WAN and LAN ports may be the same and that's commonly the case). I've seen that option called Virtual Servers in some routers; Port Redirection in others.
Re: Networking over the Internet
Port-forwarding may not be enough, though.
If you configure everything and the connection still won't work, your ISP may be the culpit.
When you'll be sure you've done everything right, ask it firmly to clarify not only whether any ports are closed, but (what's more important) whether your ISP had configured port forwarding on it's end.
Today many mobile ISPs claim to not block any ports but forget to clarify that they do not need block anything due to the configuration of their equipment.
If you configure everything and the connection still won't work, your ISP may be the culpit.
When you'll be sure you've done everything right, ask it firmly to clarify not only whether any ports are closed, but (what's more important) whether your ISP had configured port forwarding on it's end.
Today many mobile ISPs claim to not block any ports but forget to clarify that they do not need block anything due to the configuration of their equipment.
Last edited by 4aiman on Sun Jun 19, 2016 8:02 am, edited 1 time in total.
Re: Networking over the Internet
I cannot thank you enough for informing me of the 0.0.0.0 address. Networking is working now.
Who is online
Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Bing [Bot] and 4 guests