Tag Archives: magic packet

Wake on LAN via Windows


To wake a machine from a Windows computer there are a few choices.


wolcmd for the command line from Depicus.com is good to use in scripts or by itself. It works 100% of the time for me.

 wolcmd yourmacaddr localserveripaddr 9

wolcmd can start the Linux server using wolcmd <-download page, from Depicus.com

Wake on LAN GUI

A GUI version of the wolcmd tool from Depicus.com WakeOnLanGui

WOL Magic Packet Sender Tool

WOL Magic Packet Sender, uses a WOL Setup MSI file.  I have used this quite a bit and it does work nicely. It is the first one that I used and have it on my Windows machines.


At Depicus.com you can wake your machine directly from the Internet as well without loading any application via this page –> http://www.depicus.com/wake-on-lan/woli.aspx

There is even a way with the Depicus site to make up a URL that will have the MAC address, IP address and Port as parameters to send a magic packet. I’ve tried it and it works.





Wake On LAN via Ubuntu Linux

Wake on LAN (WOL), works great, sometimes it is a bit tricky to configure. With Linux, the client that sends the magic packet requires etherwake and the unit to be waked requires ethtool to be installed. Ethtool configures the OS to actually boot on the Network Interface Card NIC’s command. The NIC has to support Wake on LAN and the BIOS has to be set up to use it.

Installing etherwake…

sudo aptitude install etherwake

Installing this package actually installs both etherwake and wakeonlan. To wake the computer….

wakeonlan MAC-Address-Here


etherwake MAC-Address-Here

MAC Address

MAC Address, aka Physical Address of a Linux machines NIC can be found by executing ifconfig. In Windows, you can use ipconfig /all.




sudo apt-get install ethtool

Use for eth0, enabling WOL…

sudo ethtool -s eth0 wol g

To check if the system is armed for WOL, run…

sudo ethtool eth0

Towards the bottom you should see

Supports wake on: g
Wake on : g

On my PC, I noticed that once it is waked. It is necessary to run…

sudo ethtool -s eth0 wol g

To re-arm the WOL, every time it is remote waked.

I will write a bash script to shutdown the server. It will execute…

sudo ethtool -s eth0 wol g
sudo shutdown -P now

Ensuring that when I power the server down remotely, it will be armed for WOL.

Better than that I found out by looking online while researching how to auto-suspend the server, this little piece…

Create “/etc/udev/rules.d/50-wol.rules” with the following contents:

ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth*", RUN+="/usr/bin/ethtool -s %k wol g"

Check the syslog after creating it, errors will appear there if you spelled something wrong or whatnot.

tail /var/log/syslog

but as of now, no errors, but not setting wol g either. Still trouble shooting.

I found this piece at …


The article talks about auto-suspending. But I found another article on auto-suspending that requires only a simple bash script that I have placed in /etc/cron.hourly but the article


does not give you the conf file, but it references another article in German


that does have a conf file and it seems to work, at least it runs. I have yet to see if it actually will auto-suspend! I am working on it right now and will post an entire write up when the bugs are worked out.


Remote vs Local

The first try most likely be on your own LAN. To do it for real remotely requires setting up your router to forward ports. I had to set it to forward port 7 and 9 to the outside world. Then it is a matter of sending a magic packet to the ISP address that your router reports of a FQDN ( Fully Qualified Domain Name), remotely I had to have the bit mask set to when using a utility on a website. Locally I noticed ( broadcast ) worked.


I read a bit about WOL here before attempting to set it up.