<div dir="ltr"><div><div>I wanted to share how I have been able to setup a Windows 32 bits executable on Ubuntu x64 using Wine,<br>the EXE has been compiled with Delphi (the same works with Lazarus),<br>the program is an embedded http server listening on port 80,<br>
any program listening on low ports (server sockets on ports 25, 80, 110, ...) will obtain WSAEACCESS error when running it,<br></div></div><div><div><br>install Wine on your Ubuntu, then<br> sudo setcap cap_net_bind_service=+ep /usr/bin/wine<br>
sudo setcap cap_net_bind_service=+ep /usr/bin/wine-preloader<br> sudo setcap cap_net_bind_service=+ep /usr/bin/wineserver<br> sudo setcap cap_net_bind_service=+ep /home/default/Demos/Bin/Ultima.exe<br><br>you are ready to run your program using:<br>
wine /home/default/Demos/Bin/Ultima.exe<br><br> maybe you will also need <br>sudo capsh --inh=cap_net_bind_service --uid=1000<br> to obtain the uid of user "default" (if your username is "default"): <br>
id default <br><br></div><div>this setup is very light and provide no routing overhead since it is not using the technique of iptables <br>sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080 <br>
</div><div>which is not always possible since it would require to modify the listing ports inside your program.<br></div></div></div>