Question Wake on WAN partially working


Junior Member
May 1, 2023
I'm trying to set up "Wake on WAN" on my local dekstop PC.
I've enabled the related settings both in the BIOS and in the ethernet network adapter's advanced settings, and the system works when I send the "magic packets" from a PC inside the network (wake on LAN).
However, when I try to send the wake-up packets from outside the network, it only works for a while (~5 min) after the local PC has been shut-off.

The PC to be woken up has a static IP assigned by the router through DHCP reservation, the packets are sent to the PC though a (dynamic DNS) address, and the local UDP port 9 (used for WOL) had been forwarded to the static IP of the local PC.
I've disabled all the power-saving settings in the Windows power plan, the network adapter's settings, and in the BIOS.
Using Wireshark I've also verified that the packets are being routed to the destination port, both when they're sent from inside the network and from outside.

Any idea why this is happening, and how I could get wake on WAN to work?

Thanks in andvance


Junior Member
May 25, 2017
I know it's been a while, but there are a pair of stackexchange answers with info on the problem you're experiencing.

Basically, the 5-minute timeout represents how long it takes the MAC address of your PC to age out of your router's ARP table.

WOL packets aren't delivered to IP addresses, they're delivered to MAC addresses. That's precisely because a PC only has an IP address when its NIC is running and connected.

Even if you have a static IP assigned to it in the router, and even if you have a permanent, static port forwarding rule, 5 minutes after your PC shuts down and its NIC goes offline, the router forgets what MAC address is associated with that IP. Then it can no longer forward the magic packets when they come in.

If your router gives you the ability to statically add entries to its ARP table, then you can statically map the static IP address to the PC's MAC and you're good to go. (You wouldn't even technically be using DHCP anymore, at least on the router side.)

Assuming your router doesn't have that feature (and it's a very rare device if it does), the only way you'll likely be able to get things working the way you want is outlined in Evan Plaice's answer (not to be confused with Evan Anderson's answer — it's an Evan party!) at the first link I posted.

Basically, you need to forward the inbound port to the broadcast IP address for the LAN subnet.

Assuming your LAN is a /24 segment, the broadcast address is the IP address of devices on the subnet, with the last octet set to 255.

PC IP addressBroadcast address

* – (Where c is in the range 16–31.)

Then, when sending WOL packets from outside the network, you need to send them to the IP address of your router, but the packets need to contain the MAC address of the PC as the target device, since every device on the LAN will receive the (broadcast) magic packet, but only the device whose MAC matches the magic bytes inside it will respond.

As Evan (P.) details, there are some security risks to doing this — unicast WOL is safer than broadcast WOL. But due to the design of the WOL protocol, when magic packets originate from outside the LAN broadcasting them to the entire subnet is probably your only option.
  • Like
Reactions: VirtualLarry