By Joe Moran
These days you don’t need to be sitting in front of a PC to use it considering the countless utilities/services that can provide remote access to a system over the Internet.
If you regularly access a system from afar, you probably leave it on 24/7 to ensure its constant availability. Keeping a system perpetually powered on can be a tremendous waste of energy and money, and as it turns out you don’t necessarily have to run a system all day and night in order to guarantee remote access. Setting a system up for Wake-on-LAN (WoL) will allow it to enter various power-saving modes–standby, hibernation, even a complete shutdown–and still let you rouse the system from its slumber when you needed.
How Wake-on-LAN Works
WoL (which only works on wired connections, incidentally) has been used for years as a way for network administrators to turn on PCs without having to pay them a visit. WoL works by creating and issuing a specially formatted network packet (often referred to as a “magic” packet, and typically generated via a software utility) containing a target PC’s MAC address. To reach a PC that’s not running and thus unreachable via TCP/IP, the packet is broadcast to every system on the subnet. When the target PC– which is still getting power to its network adapter– sees the packet, it recognizes its MAC address within and springs back to life.
That’s how WoL works on a LAN, but getting it to function via the Internet isn’t nearly as straightforward. Delivering a magic packet to a router is simple enough, but the router must in turn be able to forward the incoming packet as a broadcast to the local network. Problem is, few if any consumer/small office routers allow this, as it’s a big no-no for security reasons.
It is possible to get WoL to work across the Internet by giving a target PC a static or reserved DHCP IP address and configuring the router to forward the magic packet to that address. The problem is that this method won’t work for long because once the PC is powered off its entry in the router’s ARP cache (which maps IP addresses to MAC addresses) will expire (not immediately, but eventually) making the PC unreachable.
If you have a compatible router, a relatively simple and reliable way to implement WoL over an Internet connection is to ditch the stock firmware in favor of the third-party DD-WRT. After upgrading your firmware and configuring the router for remote administration, you’ll be able to log into the router and directly issue WoL broadcast packets to your local network right from the administration control panel to bypass any port-forwarding issues.
Setting Up the PC
Before you can remotely wake up a PC, you’ll need to configure it for WoL (if it was manufactured this decade and has Ethernet built-in, it’s almost certainly WoL compatible). The first step to activating WoL is to make sure that the feature is turned on in your system’s BIOS— look for and enable the setting called Wake on LAN, Power-on LAN, or something similar. The setting is frequently found in a configuration category labeled Onboard devices, Power Management, or ACPI. (If you can’t find a WoL setting in the BIOS, all may not be lost, because I’ve encountered at least two systems that supported WoL despite the lack of a BIOS setting.)
The second step is to configure the hardware settings for the network adapter within Windows, which you can get to the same way whether you’re running XP or Vista. Fire up Device Manager and find the entry for your wired network adapter, then under the Advanced tab, look for any settings referencing Wake on LAN (there may be several) and make sure they’re enabled. Now head over to the Power Management tab and make sure Allow this device to wake the computer is checked.
Setting Up the Router
After upgrading your router to DD-WRT (instructions are here), log into the control panel and click the Administration tab, then from the Management tab, make sure you enable Web GUI Management under Remote Access. Now click the WOL tab, where you’ll find a list of systems along with their host names and MAC addresses displayed under Available Hosts. Check Enable WOL next to the system or systems you want to wake remotely and they’ll be added to the WOL addresses list below.
Now it’s time to test the setup. Shut down your target system or put it into hibernation and wait for the system to go completely dark. Then click on the system’s Wake Up button in the DD-WRT control panel; the router will broadcast a WoL packet with the system’s MAC which should instantly cause it to emerge from Rip Van Winkle mode.
Waking up a system across an Internet connection works pretty much the same way, but remember that in order to access your router via the Internet you’ll need to point the browser to your ISP-assigned network address (and use the custom port number defined in the DD-WRT control panel– default: 8080). If your ISP address changes periodically (which is commonplace), using a Dynamic DNS service will give you a consistent domain name from which to access your router. For more details on Dynamic DNS including how to set it up, see this article.