0

I have a Node Application running on a Server, with a Static IP @ 172.168.355.27

On it is a node server is running locally, it can be address through localhost:3000 or 127.0.0.1:3000

This is a Windows Server.

Will

netsh interface portproxy add v4tov4 listenport=80 listenaddress=172.168.355.27 connectport=3000 connectaddress=127.0.0.1

Make it so any user can see the information at localhost:3000 if they go to 172.168.355.27 or is there a better way to do it.

2
  • Bypassing the netsh portion, the more standard way to do this would likely be with a Reverse Proxy. Apache on Windows is one potential option for this. Doing some simple port forwarding in your router and properly configuring any firewall(s) (e.g. in Windows) is another possible option. May 12 '19 at 18:40
  • 127.0.0.1 is a loopback address. You have to ensure that your node application can also be accessed if you type in your static IP address with port number. If so, then all you need to do is setup port forwarding on your router.
    – LPChip
    May 12 '19 at 18:44
1

@Anaksunaman suggested a Reverse Proxy, and I just used this tutorial.

https://dev.to/petereysermans/hosting-a-node-js-application-on-windows-with-iis-as-reverse-proxy-397b

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.