Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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?

share|improve this question
    
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
add comment

1 Answer 1

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.