[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: 879
Joined: Sun Sep 02, 2012 10:46 pm

Re: enet cannot create any server

Post by Karai17 » Sat Jun 15, 2019 8:06 am

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: 1691
Joined: Sun Oct 18, 2015 2:58 pm

Re: enet cannot create any server

Post by pgimeno » Sat Jun 15, 2019 8:41 am

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: 879
Joined: Sun Sep 02, 2012 10:46 pm

Re: enet cannot create any server

Post by Karai17 » Sat Jun 15, 2019 9:12 am

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
Citizen
Posts: 99
Joined: Fri Apr 21, 2017 9:17 am

Re: enet cannot create any server

Post by PGUp » Sat Jun 15, 2019 4:41 pm

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!
-

dusoft
Citizen
Posts: 95
Joined: Fri Nov 08, 2013 12:07 am

Re: enet cannot create any server

Post by dusoft » Sun Jun 16, 2019 1:57 pm

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 13 guests