0

I have a local address e.g:

http://127.0.0.1:8125/ -> this works,

How would I access this using a different PC lets say from work, or friends house or allow anyone to access this?

I am using node.js to create a simple server and listens for the above port on that local IP

any help would be appriciated.

Val
  • 113
  • 6
  • The 127/8 block is the loopback address, it means "this computer". If you go to any other computer and enter that address it will always go to the computer you're at, not your home computer... – Chris S Jan 24 '12 at 13:52

2 Answers2

2

You need, at a bare minimum:

  1. A public IP address

  2. Whatever port your app runs on open on that IP

This will allow you to browse to your page by typing the public IP and port number into the address bar of a browser.


Realistically, you need:

  1. A static public IP address

  2. Whatever port your app runs on open on that IP

  3. Register a domain name

  4. Have one or more (at least 2 is best practice) DNS servers that hold an authoritative copy of your zone.

This will allow your application to be accessed by typing: http://whatever.tld. If you use a non-standard port (I.E not 80 or 443) you'll need to append the port number at the end of the address following a colon.

MDMarra
  • 100,183
  • 32
  • 195
  • 326
  • I tried, my IP plus the port number e.g: http://123.456.789.1:8125 but no joy on that. does the IP have to a static one? – Val Jan 24 '12 at 13:53
  • No, but if you're just using a home connection, it's possible that your ISP filters incoming traffic. Some do to prevent home users from running servers. – MDMarra Jan 24 '12 at 13:54
  • @MDMarra More likely to be his home router, I'd say – Dan Jan 24 '12 at 13:55
  • @Dan Agreed, but since I listed the port being open as #2, I'd hope that it was double-checked before the OP followed up in a comment. – MDMarra Jan 24 '12 at 13:57
  • I don't mind using `:80` port and Im trying the no-IP website but still no luck there either – Val Jan 24 '12 at 14:09
  • The key point is open a port on the Internet side of your router in the NAT settings area and redirect that to the 8125 port on your PC on the LAN side of the router. Your PC on the LAN side will have been assigned an IP other than the local host IP i.e. not 127.0.0.1 something like 10.*.*.* or 192.168.*.*. If you are using a LAN IP address assigned by the router, you might want to consider using a static IP address in case your PC's IP address changes. – Stuart Woodward Jan 24 '12 at 14:22
  • I'd love for whoever downvoted me to explain what is wrong in my answer :) – MDMarra Jan 24 '12 at 15:19
  • I'd like to know how down voted my questions lol, someone had a bad day :) thnx mate, this works. – Val Jan 25 '12 at 09:55
0

You need an Dynamic Host like dyndns. If you have an Hostname you configure and port forwarding in your router to your workstation and you can access it from every point of the whole internet :)

Dennis Wisnia
  • 259
  • 2
  • 12