I am using some node program which upon launch listens only to the local address.
vagrant@precise64:~$ netstat -tnl | grep 8080
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN
So that despite me forwarding the local port 8080 to my host computer, I can't display the page served at that port, as the local computer does not listen on every ip, only the the ip 127.0.0.1
Is there a way to fix this which does not involve modifying the program or using ngrok ?
Like adding a local program that would listen to every ip and forward remote requests on the local interface ?
You provided very little information. You didn't even say what protocols are you using, i.e. raw TCP or HTTP etc. If you're using HTTP then the easiest thing would be to make a proxy with nginx or http-proxy module. If you're not using HTTP then you cannot do it. You didn't say what OS you're using so it's impossible to recommend any particular way of port forwarding on the IP level - on Linux you can use iptables for example.