Can Wake on LAN work on VPN connection?

Is it true that we can’t allow any machine to sleep that may need to be accessed via a VPN connection?

(I am asking this on server fault as it is as much about VPN servers than about the end-user PCs sleeping)


Old thread but I wanted to chime in because it is still the top rated search result for "wol over vpn".

Yes the WOL magic packet is defined within the constrains of layer 2 but this does not mean it cannot be contained inside a network and transport protocol entity which can then be used to route it across the VPN. The reason for this is the "magic" sequence can be anywhere within the payload. So essentially it becomes a matter of getting a regular routable packet to the target host with the "magic" sequence inside its payload.

Most implementations of the magic packet use UDP port 9 although this really does not matter as long as it is routed correctly and transmitted on the same broadcast domain as the target computer. As long as the VPN client has the correct routes, it can send a broadcast packet such as 192.168.1.255 (a broadcast address) correctly to the VPN gateway across the internet.

So routing it is really straightforward, the issue may lie with broadcasting it correctly from the target VPN gateway. This means configuring the VPN gateway/finding an option, to forward broadcast traffic from VPN remote clients to the local network.


Typically no since the "MagicPacket" is actually at layer 2. It's not even routable without the assistance of forwarders (e.g. IP helper).


Yes you can, instead of sending the WoL packet to broadcast address in target network, just send it to the IP address of the machine you want to wake up. Programs tested with PPTP VPN:

  • http://www.nirsoft.net/utils/wake_on_lan.html
  • https://play.google.com/store/apps/details?id=com.overlook.android.fing