wine winsock and "lo" interface on linux defaults to 127.0.0.1 for my app.

Questions about Wine on Linux
Locked
Toetje583
Newbie
Newbie
Posts: 1
Joined: Wed Jun 29, 2022 7:11 pm

wine winsock and "lo" interface on linux defaults to 127.0.0.1 for my app.

Post by Toetje583 »

Dear community,

I have made some progress running Farming Simulator 17/19/22 server on wine and wine-docker here: https://hub.docker.com/r/toetje585/dock ... erver-fs22#!

Until now I always needed to have a nginx running on my host and inside docker containers to forward 127.0.0.0.1:8080 to 0.0.0.0:8080 because of the dedicatedServer.exe binding to the loopback interface by default.

it uses "gethostname" "getaddrinfo" and they are set correctly for the host and they seem to get parsed just fine (Included winsock trace in the .zip). However for some reason it still binds to the loopback interface. I first used Procmon64 on windows host to see if there would be any launch arguments that could help but there are none. So now i'm back looking at wine because I guess this could be a wine bug.

On Windows it always selects the correct interface but on Linux it always defaults to the "lo" interface by default.

if i do "ip link set dev lo down" before starting the dedicatedServer.exe and quickly do "ip link set dev lo up" it binds to the correct interface and the admin panel works from the outside. So it seems if the lo device is not present it binds it just fine. Does any one have more suggestions for me to nail this one down?

Best Regards,
Attachments
Debug.zip
(133.37 KiB) Downloaded 56 times
User avatar
slowpokefarm
Level 2
Level 2
Posts: 14
Joined: Thu Jul 28, 2022 5:59 am

Re: wine winsock and "lo" interface on linux defaults to 127.0.0.1 for my app.

Post by slowpokefarm »

Hi there! I think I'm having the same issue with different game. It seems that the lo interface under wine is recognized as a primary ethernet device. Probably because it's the first one listed the GetInterfaceInfo of iphlpapi.dll or somewhere else. Usually it's the first interface available on your linux server while on Windows there's no loopback device by default.

Also here's a similar bug that was fixed but the comments state otherwise: https://bugs.winehq.org/show_bug.cgi?id=40247#c13

Thank you for suggesting turning it down and up, I will try this trick to get our game work.
Locked