A computer can't be reached remotely when it's asleep, but a Mac can be woken remotely in some cases. You can also disable sleep mode. I explain both methods.
Mac OS X (and Windows) can be woken from a slumber through a bit of Sleeping Beauty magic. Rather than a prince's kiss, a specially formed packet sent to the right network port, whether sent over a local network or remotely, awakens the computer.
For this to work outside the local network, however, the computer in question must be connected to your local network via Ethernet and have a publicly routable IP address; you can also use a mapped port on a router for a single computer on the local network, but that computer still must be connected via Ethernet to the local network.
To allow this kind of remote wake-up call, follow these steps:
Open the Energy Saver system preference pane.
If you don't see the Sleep and Options buttons, click the Show Details button. Click Options.
Check the box for Wake for Ethernet Network Administrator Access (Figure 9-1).
Now, you need a way to wake that Mac up. Download WakeOnLan (http://www.readpixel.com/wakeonlan), a free package that scans a local network, shows available computers, and lets you select them and tell them to Wake Up! (as the button's label reads, Figure 9-2).
Scan first: Run WakeOnLan while computers you might want to wake up are actually still awake; otherwise, the program can't spot the computers when they're asleep.
Figure 9-2. WakeOnLan scans the local network to find computers and other devices. I've never seen Sleep! light up, but Wake Up! is an option for any device, even when already "awake."
WakeOnLan also works remotely for:
Any computer that has a publicly routable IP address; or
A computer with a private IP address that has its port 9 mapped to a gateway's port 9, where the gateway has a publicly routable IP address
You need to know both the IP address and the MAC address of the computer—its unique Ethernet adapter address—for remote wake ups to work.
You can find the MAC address for the adapter that connects a computer to the local network in one of two ways. Launch WakeOnLan on the same network, and all the MAC addresses are exposed; that's pretty straightforward. Or, launch System Preferences, select the Network preference pane, and choose the Ethernet adapter. Click the Advanced button. The MAC address for the Ethernet adapter is called Ethernet ID, and is found at the top of the Ethernet sub-pane.
In WakeOnLan, choose Hosts > Add, and enter the name, the publicly reachable IP address, and MAC address of the computer in question. That entry then appears in the WakeOnLan list, and you can select its entry in the future to wake it up.
To keep your computers reachable, follow these steps:
Open System Preferences, and select Energy Saver.
If you see a Show Details button at the lower left, click it. (Otherwise, the details are already showing.)
In the Sleep pane, drag the "Put the computer to sleep when it's inactive for" slider all the way to the right to Never (Figure 9-3).