Page 2 of 2
Re: Multiplayer using sock.lua
Posted: Tue May 08, 2018 9:56 am
by Quôzul
It seems the problem is coming from my computer, I asked a friend to host a server and it worked
That's really strange
EDIT:
KayleMaster wrote: ↑Tue May 08, 2018 9:53 am
You can't connect with your public ip because your router probably doesn't support hairpinning. (if you are connecting from the same network)
Hairpinning is where a machine on the LAN is able to access another machine on the LAN via the external IP address of the LAN/router (with port forwarding set up on the router to direct requests to the appropriate machine on the LAN).
Sorry, I don't really understood what you said especially what hairpinning is.. but I port forwarded the corrects ports (22122) on my router with UDP and TCP protocols.
Re: Multiplayer using sock.lua
Posted: Tue May 08, 2018 10:22 am
by KayleMaster
It doesn't matter that you portforward, if your router doesn't support that feature, you won't be able to connect from the same network via your external ip, that's how it works. And that's why it works when someone else is hosting the server, because he's now on a different network.
Re: Multiplayer using sock.lua
Posted: Tue May 08, 2018 10:32 am
by pgimeno
Does it work if you host a server and your friend tries to connect to it?
If so, then it's what Kayle says: you can't connect to your LAN from your LAN via the external IP, because the external IP is only visible from the outside.
If not, the problem must be different (possibly the IP).
Re: Multiplayer using sock.lua
Posted: Tue May 08, 2018 11:02 am
by Quôzul
pgimeno wrote: ↑Tue May 08, 2018 10:32 amDoes it work if you host a server and your friend tries to connect to it?
No, he can't connect to the server if I host it
Re: Multiplayer using sock.lua | Can't host a server
Posted: Tue May 08, 2018 3:18 pm
by NotARaptor
Might be a long shot, but if your friend can host it and you can connect, but not vice-versa, check your firewall settings.
Re: Multiplayer using sock.lua | Can't host a server
Posted: Fri May 11, 2018 2:59 pm
by Quôzul
NotARaptor wrote: ↑Tue May 08, 2018 3:18 pm
Might be a long shot, but if your friend can host it and you can connect, but not vice-versa, check your firewall settings.
I allowed the right port in my Windows firewall but it doesn't seems to work also
Re: Multiplayer using sock.lua | Can't host a server
Posted: Fri Aug 06, 2021 6:34 pm
by leankyr
I am also having the same problem. I have port forwarded my router. i have allows love2D through firewall but I cannot host whatsoever. Does anyone know the IP we need to use in order to host? Should it be the private IP or the public IP? The Best Results I got with hamachi but when I connect from another network it is too slow and i get disconnected often. Any Idea would be helpful! Thanks!
Re: Multiplayer using sock.lua | Can't host a server
Posted: Sat Aug 07, 2021 3:25 pm
by Xii
leankyr wrote: ↑Fri Aug 06, 2021 6:34 pm
Should it be the private IP or the public IP?
Generally always the
public IP. Private IPs only work on the Local Area Network (LAN), i.e. only for computers connected to your modem/router.