4

I've been using the new windows bash for local dev, and whilst it's been great for most things, I can't seem to make any ports created by my webpack setup viewable on anything other than

localhost:{port}

Which works great. But I want to be able to see this from other devices on my network.

For some reason my computer's IP doesn't work (even on itself) so:

192.168.1.7:{port}

returns a connection refused error.

I've disabled windows firewall, disabled antivirus, tried configuring my router to forward the ports, but haven't had any luck.

As a side, I also run my Octopi with it's port exposed over the network without any issues.

Any ideas on what might be up?

user1158023
  • 337
  • 2
  • 6

1 Answers1

0

Without seeing any of your setup, and not knowing what you have running that's listening on localhost:{port}, it's difficult to give you constructive help.

However:

Note that WSL distros (and the apps you run on them) run alongside your Win32 processes, above the Windows Firewall. Thus, on the same machine, you should be able to run/host a node/Ruby/Python/.NET site/app, and access it from Edge/Chrome/Firefox/whatever running on the same machine, because your traffic doesn't reach the firewall.

If your app/site isn't visible on the same box, there's a very good chance, your app/site isn't running/listening at all.

After confirming that you can reach your endpoint locally, to access it from an external box, you'll need to open up the required port in your host machine's firewall.

You might want to test accessing your machine from a remote PC by selecting "Network" in your Windows Explorer, enabling network discovery (see screenshot below), and trying to access a file share from a different machine. enter image description here

HTH.

Rich Turner
  • 10,800
  • 1
  • 51
  • 68