allow phone to access PCs localhost at specific port

12,502

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.

Share:
12,502

Related videos on Youtube

Phil
Author by

Phil

Enthusiastic lover of Jesus who enjoys web developing.

Updated on September 18, 2022

Comments

  • Phil
    Phil over 1 year

    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
    • Appleoddity
      Appleoddity over 6 years
      How can anybody help you if you don't post what operating system you're running? And, please post the firewall rule you setup?
    • Appleoddity
      Appleoddity over 6 years
      And what firewall for that matter?
    • Phil
      Phil over 6 years
      @Appleoddity updated. thought the tag would have been enough
    • Darius
      Darius over 6 years
      Are you sure the NodeJS app ONLY uses 3001 and nothing else? I mean the initial connection may use port 3001 but it may also spawn and use other ports?
    • Phil
      Phil over 6 years
      for localhost, i'm forcing it to run on 3001
    • Appleoddity
      Appleoddity over 6 years
      When your setup the firewall rule you also have to specify which location it applies to - public, work or domain. Did you choose one or just choose all? The rule is specific to which kind of network Windows thinks it is on.
  • Sean87
    Sean87 over 3 years
    I can not thank you enough...this saved my life :)