-1

I have my nodejs server app running on my windows 10 machine which uses my home internet connection. When I am connected with my phone to my home internet and write the IPv4 Address and port I get a response and my web page loads, but when I use a different internet connection it doesn't load.

I turned off the firewall, tried a lot of different ports but nothing worked. I tried app.listen(8000) or app.listen(8000, "0.0.0.0") but both didnt fix the problem.

Any ideas what might be the problem?

Gilad Baruchian
  • 930
  • 3
  • 14
  • 30

1 Answers1

0

OK I found out how to do this, my port forwarding was not configured correctly. Here is how I solved it in case someone has the same problem:

  1. Connected to my router (in cmd write ipconfig, copy the Default Gateway ip and paste in browser).
  2. Clicked port forwarding (each router have it in different place), set external IP to 0.0.0.0 and my app port, and set internal ip to my computer ip (you can just write "what is my ip" in google) and same app port.

I hope it will help someone.

Gilad Baruchian
  • 930
  • 3
  • 14
  • 30