https://stackoverflow.com/questions/8652948/using-port-number-in-windows-host-file
netsh interface portproxy add v4tov4 listenport=80 listenaddress=127.65.43.80 connectport=8080 connectaddress=127.0.0.1
I managed to achieve this by using Windows included Networking tool netsh.
As Mat points out : The hosts file is for host name resolution only, so a combination of the two did the trick for me.
Example