[SOLVED] enet cannot create any server

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: enet cannot create any server

Post by Karai17 »

I have never in my life been unable to connect to a server i bound to 127.0.0.1 or localhost.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
pgimeno
Party member
Posts: 3544
Joined: Sun Oct 18, 2015 2:58 pm

Re: enet cannot create any server

Post by pgimeno »

Weird. Maybe you have a route of some sort to 127.0.0.1 (which sounds like a security risk). If I run

Code: Select all

nc.openbsd -l 127.0.0.1 7766
on one computer and try to connect from another with

Code: Select all

nc.openbsd -v <ip> 7766
it doesn't connect. However if I use this in the first machine instead:

Code: Select all

nc.openbsd -l 0.0.0.0 7766
it connects perfectly.

Edit: See also https://stackoverflow.com/questions/240 ... t#24057311

Edit2: In https://security.stackexchange.com/ques ... onnections it says that for IPv6 the situation may be different, in that it might be possible to send spoofed IP packets to ::1.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: enet cannot create any server

Post by Karai17 »

might just be a unix thing.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
PGUp
Party member
Posts: 105
Joined: Fri Apr 21, 2017 9:17 am

Re: enet cannot create any server

Post by PGUp »

my ipv4 adress suddenly changed itself, i ran ipconfig command and it was definitely changed.

it was

Ethernet adapter Ethernet:
IPv4 Address. . . . . . . . . . . : 192.168.100.7(Preferred)

to

Ethernet adapter Ethernet:
IPv4 Address. . . . . . . . . . . : 192.168.100.3(Preferred)

i created server on that ip and everything can connect through LAN smoothly, that's all I care about. Thanks for all the help!
-
User avatar
dusoft
Party member
Posts: 492
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: enet cannot create any server

Post by dusoft »

PGUp wrote: Thu Jun 13, 2019 4:10 am
dusoft wrote: Wed Jun 12, 2019 8:54 pm
PGUp wrote: Wed Jun 12, 2019 5:25 pm

the ip of 127.0.0.1 is the same as localhost, I'm not planning to use a localhost server, I want to connect multiple devices together.
Yes, but you should be creating host at the local address (localhost) and only then use the local 192.168.x.x (or WAN external) address from the other devices.
a localhost can only be created and connected through the same machine, other devices wont connect to a localhost, that's why it is called localhost. I want other devices to connect, not only mine
As Karai mentioned before, other devices (guests) don't care about your localhost, they would use the external address accessing your server (host).
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 54 guests