Necessary requirements
This page lets you wake up your computer remotely over the internet. But you must fulfill some (often not so easy) requirements:
- Wake On LAN must be enabled on your network card (its normally configured in BIOS)
- Your computer must be in soft shutdown (not turned off by long push of power button)
- Your computer must be reachable from the internet (if you are over NAT, it's the only way to configure forwarding on your router/FW)
- last hop router (closest to your computer) has to have subnet directed broadcast enabled or last firewall (device doing NAT) has to have a special forwarding rule created
How does it work?
I've implemented Magic Packet Technology aka Wake On LAN. It sends a special packet called Magic Packet, which must reach your computer, and this packet contains the MAC address of your computer. If your network card (NIC) is in Magic Packet Mode it listens for Magic Packet and if it recognizes its own MAC address inside, it turns on the computer.
So the main problem is how to handle the packet reach network card of your computer. Turn off NIC has its own MAC address but doesn't have an IP address (association of MAC address and last IP address is in the memory of the router for some time). If the last hop router has information about an IP address, we can send Magic Packet as a normal unicast, the router receives it and sends it to the correct subnet.
Another way is we could use Subnet Directed Broadcast (this packet is sent as unicast until it reaches the last hop router and this router sends it as a broadcast to the correct subnet), but because of security reasons the subnet directed broadcast is normally disabled on routers.
The last possibility is more special and can be used for some home networks if you use NAT. You can configure router which have public IP address. In this case you can configure forward rulewhen router listen for packets on some port and forwards them as broadcast or unicast to destination computer. You send Magic Packet to the public IP address of the router and a configured port. The router forwards it as a local broadcast or unicast on all of its local ports.
How to use it
Fill up your:
- MAC address
- last IP address of your computer (or the IP address of your router for forwarding or the address of the subnet directed broadcast)
- subnet mask (the subnet directed broadcast is calculated from the IP and mask), if you don't fill up the mask, the packet is sent as a unicast
- UDP port is optional (default is 9 - discard).