I have enabled web sharing in System Preference. Still when I try to access my machine from outside the LAN using safari url: http://my-laptop-ip-address/ I get this - "Can open the webpage" Why?

  • Is there a port forward rule setup on your router that forwards incoming requests on port 80 to your Mac behind the firewall on your LAN? – Ian C. Apr 11 '12 at 15:36

It's likely that your router is engaging in Network Address Translation. In order to see the web page inside your LAN from outside of it...

  1. You'll have to turn on port forwarding on the HTTP port that you're serving (80 is the default) to direct any traffic to the internal address. This process varies from router to router, so you'll have to look at the manual that came with that device.

  2. It's best to also set up a static IP address for the computer serving the website so that if it reboots, the port forwarding still works. This is unnecessary if you can port forward using the hostname (not typically supported). This also varies from router to router.

  3. Direct your clients to your externally-facing IP address. If you don't have a reserved IP through your ISP, this might change from time-to-time, especially if you restart your modem, so I recommend...

  4. (optional) Get an account at a dynamic dns host such as DynDNS to allow external users to see a persistent address. You'll have to install some software on the server to periodically make sure that the IP address is correct.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .