For this example we use the new Baldurs Gate III for play via online LAN using a VPN for play with friends like local network (it also works for LAN only without VPN if you need it for some reason)
- Install VPN over you linux network, for my case I've used ZeroTier One, (install configure and test that it work nice in your linux).
- Install Bottles or Lutris or you wine manager preferred (for this example I'll use lutris)
- Install your game
- Install IPXwrapper Download an extract file over your game main folder, where is the main .exe file, not the launcher, the main file, for the case of baldurs gate we search the folder where is the files bg3.exe or bg3_dx11.exe )
After of have all in order and stay sure that VPN works nice over linux, now we need hook it in windows, in the wine.
Need execute the ipxconfig.exe
the which was extracted before (IPXwrapper), execute this file using ==Run EXE inside wine prefix== or whatever that allow execute this file in the wine (bottles, lutris, etc)
Next in the Wine configuration, under Libraries tab add wsock32 in New override for library, and set it to use Native then Builtin under Edit Override
Also you probably could add it in DLL override options of your wine manager or using enviroment variables.
In DLL override
in key add wsock32
and in value add native,builtin
OR n,b
test with both because i am not sure which work.
Now you can play the game and going to multiplayer and connect your game with your VPN friends (In whatever SO, windows, mac , linux) Enjoy!!! Thanks to HectorBailey the which teach this method in old game. He is my reference for this guide (https://github.com/HectorBailey/Total-Annihilation-Linux-Wine)