Windows – allow phone to access PCs localhost at specific port

firewallwindows 10

I'm running a NodeJS app running at port 3001. I want to be able to access that website from my cell phone.

My local ip is: 10.0.0.27 and my cell phone is 10.0.0.7 I disabled the firewall and it worked. I created an inbound rule that exposed port 3001 to the world (or so I thought I did) that did NOT work.

I know it's a firewall issue, I'm just not sure how to create the inbound rule to allow 10.0.0.27:3001 to be access but not blanketing a port 80 allow or disabling the firewall.

This is Windows 10

Firewall setup:

  • Local Port: 3001
  • Remote Port: All ports
  • Any IPs, any users
  • Public, Private and Domain

Best Answer

It does appear to be a firewall issue. Can you be absolutely sure it only requires port 3001 and it is TCP?

It sounds like you set the rule up right, but let's double check.

  1. Open Control Panel -> Windows Firewall
  2. Click on Advanced Settings
  3. Select Inbound Rules
  4. Click New Rule
  5. Type of rule = Port then click Next
  6. Rule applies to TCP, and specify port 3001 then click Next
  7. Action = Allow the connection then click Next
  8. When does this rule apply? Choose all - Domain Private and Public then click Next
  9. Give your new rule a name and click Finish

That's it. It should work.

If it doesn't work then one of two things are going on I would say. Your connection needs more than just port 3001. If this is the case, disable the firewall again and confirm the application works. While the application is connected, run the following command from an administrative command prompt: netstat -abn | more. Page through the results and identify the listening ports or active connections associated with your endpoint. This might show something you weren't aware of.

Otherwise, some other piece of software on the computer may be blocking something. Just make sure no other security software could be blocking things.

Related Question