How To Wake up Windows Machine via WOL from Synology NAS (or any Linux Server)

32

Here on NOW, We’ve covered many tools around WOL, Wake On Lan. WOL, allowing you remotely to Power On a local network computer. If this is something you are interested, we have a full tutorial showing you how to set up WOL on Windows on your local network. While the ability to remotely turn on and off the machine is cool, it’s important to note that this only works in a local network area.

To overcome the local network issue, it’s probably a good idea to have a server always on and accessible from the outside world. I happen to have a Synology NAS server which could be an ideal machine to serve as a proxy from your home network to the outside world. If you have a Synology running DSM (Disk Station Manager) you can follow the steps below to trigger WOL to any local network devices that support it. The setup doesn’t require additional source nor installs packages.

[Update June 7th, 2016]: If you have DSM 6.0 or later, please follow the below steps to enable remote WOL/send a magic packet to your local network machines.

[Update July 5th, 2019]: Added a missing Ethernet port eth0 to the synoet call example.

How To Enable Synology DSM 6.0+ to send WOL/Magic Packet

Ever since Synology released DSM 6.0, even in 6.0 beta, the previous method for sending WOL packets no longer works. They have removed ether-wake command (see sample error below), but fortunately, there are still ways to send WOL or magic packet to wake up local network machines.

Current status: 1 (Interrupted)
 Standard output/error:
 /tmp/esynoscheduler.script.28484: line 1: ether-wake: command not found
 /tmp/esynoscheduler.script.28484: line 2: etherwake: command not found

First, go to Control Panel > Task Scheduler > Edit or Create a new task, but make sure the user is root.

2016 06 07 1248 thumb - How To Wake up Windows Machine via WOL from Synology NAS (or any Linux Server)

Under the Task Settings tab, in User-defined script, instead of having previous ether-wake command replace them with

synonet –wake [your mac address here] eth0;
2016 06 07 1248 001 thumb - How To Wake up Windows Machine via WOL from Synology NAS (or any Linux Server)

Once that’s done, you can go back to the Task Schedule page view previous results, Action > View Result

2016 06 07 1312 thumb - How To Wake up Windows Machine via WOL from Synology NAS (or any Linux Server)

Here you should get a Normal status result back and if configured correctly your local machine would wake up by now!

2016 06 07 1312 001 thumb - How To Wake up Windows Machine via WOL from Synology NAS (or any Linux Server)

Configure Synology DSM Control Panel

Log in to your Synology via Public IP with IP forwarding or via Synology’s QuickConnect handle. Launch Control Panel > Advanced Mode

2015 09 25 0926 600x341 - How To Wake up Windows Machine via WOL from Synology NAS (or any Linux Server)

Go to “Task Scheduler.”

2015 09 25 0931 001 - How To Wake up Windows Machine via WOL from Synology NAS (or any Linux Server)

Let’s create a “User-defined script.”

2015 09 25 0932 - How To Wake up Windows Machine via WOL from Synology NAS (or any Linux Server)

Select the user who will have the rights to execute some command line utilities. Under the Run command section, enter the following command with your MAC address of the target device that you wish to WOL.

2015 09 25 0932 001 - How To Wake up Windows Machine via WOL from Synology NAS (or any Linux Server)
ether-wake -i eth0 00:01:02:03:04:05

Make sure you update the MAC address. If your Synology has more than one Ethernet port, make sure eth0 has a connection to the local network.

2015 09 25 0933 - How To Wake up Windows Machine via WOL from Synology NAS (or any Linux Server)

When finished configuring the task, by default it will be a scheduled recurring running task. You probably don’t want to wake up a computer always at a given moment of the day. You can go to the schedule tab and update this to “Run the following date” and “Do not repeat”.

2015 09 25 1047 600x343 - How To Wake up Windows Machine via WOL from Synology NAS (or any Linux Server)

Once you have configured that, you can always run this particular task on demand. Now you have a ready-to-go server that can wake up a home network machine remotely. If you have a Windows Server that’s always on, check out this utility to remotely trigger WOL magic packet.

Other Linux Server

It’s worth noting that the above command ether-wake should also work from any Linux server if fired remotely via SSH or Telnet. Just need to make sure the command line utility is present. If you would like to learn more about what it does, here is the manual page of this tool.

32 COMMENTS

  1. Doesn’t work over here, DS215j running DSM 6.0.2-8451 Update 2. Gives an “Interrupted (255)” error when trying to view the result.

  2. the syntax should be: (at least that’s what works for me)
    synonet — (double dash) wake ; <=don't forget the Semi-colon at the end of the line.
    I used this as a scheduled task on my main NAS to trigger my backup NAS to start up 5 minutes before the backup task starts.
    I have bonded my eth0 and eth1 ports on both NAS devices and can confirm this command also works with bond. (Truncating.)

    So the syntax should look similar to this: synonet –wake 00:00:00:00:00:00 eth0;
    And like the tutorial mentioned, the result should be "Normal (0)" when you tested it.
    (Also your machine should boot up..)

    • DS216PLAY connected to the same router as the client machine. WOL Not working for me… This tut is so simple, yet it’s not working and it’d driving me crazy. Attempting to receive WL packet on Windows 10 client machine. No software firewalls in place.

      Utilizing a wake on WOL sniffer I receive no magic packet using the synonet –wake xx:xx:xx:xx:xx; or –wake xx:xx:xx:xx:xx; commands. result is “Normal (0)” when you tested WOL packets created from other LAN machines sent to the intended recipient machine are received just fine from other WOL packet generators…

      It is as if this NAS is just not sending the packet as intended or it is not leaving the device. Any ideas?

  3. Is there a way to automatically send a WoL magic packet to a local device when a Plex client logs onto the Plex media server (‘PMS’) on the NAS?
    I am trying to find a way to use my desktop PC (without needing it to stay on 24/7) to run any transcoding required as the NAS processor is not quite up to the job!
    The NAS has automatic WoL configured that kicks in whenever a Plex client logs in remotely, but my router will not support the generation of a WoL magic packet to my desktop PC to replicate this behaviour – my intended workaround is to maintain the NAS PMS which will WoL if a Plex client logs on and then generate a WoL magic packet to wake the deskptop PMS. I can then manually select the desktop PMS from the Plex client… if it is relevant, the actual Plex libraries will remain stored on the NAS.
    Any help much appreciated!

    • I do know that you can schedule to kick it off automatically on a fixed time of the day. That said I’m not sure if you can auto send WoL packet when something happened to your Plex client. If you have a predictable schedule when to use the Plex client then it would be easy to setup. Other than that I’d be looking for custom scripts from https://ifttt.com/ see if there are any that you can leverage.

  4. Thank you so much. I have spended 5 days traying to do this and with this tutorial I have done in five minutes.
    It work fine, good work.
    Thank you.

  5. A question please: I have my mac mini at home. When i leave home, i put it in sleep mode.
    When i am away, i want to teamviewer the mac mini, but i can’t because its in sleep mode.
    So i did the steps you propose, on my sinology NAS, which is on the same network as mac mini.
    Now how can i wake up the mac mini from distance? How can i run the script from distance?

    Thank you so much

  6. Thanks a lot, it works fine.
    Is it possibile (for dummies) to reach the task (through a link, or something else) from the first screen of Synology?

    Thank you again, greetings from Italy.

  7. The job runs but my iMac does not wake up, even with “Wake for network access” enabled. Are there any ports I need to open or other security configurations I need to change on my iMac?

    • has your iMac ever woke up from any WOL packet? Try to update your iMac to run the latest supported macOS? (lastly, check make sure your iMac is connected to the same network’s ethernet, same subnet)

  8. It is confusing: synonet –wake [your mac address here]; synonet –wake . . synonet – wake[ } eth0, synonet — wake eth0 [ ], it seems all over the place. I use aquila software to wake computers and that works. With the synolgy they don’t.

    • Yeah, I found it confusing as well.
      The single line he suggests for DSM6+ has a typo.

      What finally worked for me was just a single line, but it needs the eth0 on the end:

      synonet –wake YO:UR:MA:CA:DD eth0

      That finally gave me a “Normal (0)” result and woke my machine.

      • Updated the post, and added the missing `eth0` to the example call.
        Screenshot reflected the correct value but missed that in the actual example code block. Thanks for picking this up! Hopefully, it causes less confusing.

  9. “Now you have a ready-to-go server that can wake up a home network machine remotely.”
    How can I access the scheduler remotely? What app for my android device?

  10. Anyone know of a good way to diagnose why an ethernet adapter fails to wake a windows PC?

    I got this to work on one PC – but the other fails.

    I’ve double & triple checked the MAC address – and syntax – and enabled “this device can wake the pc” and “wake on pattern” and “wake on magic packet”.

    What else is there to check?

      • That was the first thing I looked for. I couldn’t find anything – though – it could be something to do with overclocking that PC. Or some setting related to that. Who knows.

        Frustrating when things don’t work and little access to why.

        • were you able to wake up other PC via another channel? Also, try to make sure you get the right MAC sometimes a PC comes with 2 NIC and you want to pick the right one.

  11. Hi there.

    I have a synology hooked up wth 802.3ad (LACP).
    Therefore eth0 is refered to as Bond 1.

    I tried several combinations of the synonet commando to wake up a PC, while sniffing traffic with Wireshark – no success.

    Do anyone have any experience with sending WoL packages using LACP? I have not been able to find any walkthrough yet..

  12. Hi

    I’m using this syntax but still getting an error. Any ideas?

    root@NAS:~# /usr/syno/sbin/synonet –wake ‎‎B8:AE:ED:7C:A0:0B bond0
    synonet.c:1200 mac format is not correct.

LEAVE A REPLY

Please enter your comment!
Please enter your name here