It surprises me that there’s a lot of people out there who know about WOL (wake on lan), the ability to
Remotely turn on your pc/server via the network card. But doesnt know that you can do it from the Internet, and not just on your home network.
In order to wake up a computer from the Internet you need a Broadband connection with a Router connected to the Modem that keeps your connection alive (you need a Router even if you have Static IP).
Other articles on the net might referrer to a little cable that’s used to connect the NIC with the motherboard, for powering it on, however, on newer computers this isn’t necessary anymore as it works via PCI, and only need to be enabled in the bios (might be called something like Wake on PCI). But if you don’t have an on-board NIC, but and old sucky 10/10Mbit..then..well..good luck
If you use Debian as in this case, fire up apt-get, and install ethtool
Now, use ifconfig to check what your interface is called (most likely eth0)
And run ethtool with it like
Which will spit out something similar to
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: d
Current message level: 0×00000007 (7)
Link detected: yes
Notice the “Supports Wake-on†says umbg, but “Wake-on†says d (disabled)
wol p|u|m|b|a|g|s|d…
Sets Wake-on-LAN options. Not all devices support this. The argument to this option is a string of characters specifying which options
to enable.
p Wake on phy activity
u Wake on unicast messages
m Wake on multicast messages
b Wake on broadcast messages
a Wake on ARP
g Wake on MagicPacket(tm)
s Enable SecureOn(tm) password for MagicPacket(tm)
d Disable (wake on nothing). This option clears all previous options.
So we can see it supports umbg, but currently its set to d for disabled.
ethtool –s eth0 wol g
Doing ethtool eth0 again, should now show
Wake-on: g
Horay!
Now you should open a port on your router. Doesnt really matter which one you pick,so for all you people with a fetish for good looking numbers, you can just choose you’re desired one.
in this example I’m using port 8000 (such a nice number isn’t it?)
Ifconfig will show..
eth0 Link encap:Ethernet HWaddr 00:41:63:DD:78:60
inet addr:10.0.0.56 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::240:63ff:fedd:7860/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12193206 errors:0 dropped:0 overruns:0 frame:0
TX packets:12300751 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2652858583 (2.4 GiB) TX bytes:1613681546 (1.5 GiB)
Interrupt:11 Base address:0xe400
So we forward port 8000/udp to 10.0.0.56.
While we’re at it. Write down 00:41:63:DD:78:60
Since we need the mac address to wake it up from its beauty sleep.(sounds gay I know)
Now, if you want to power it on from another Linux machine, go get wakeonlan
apt-get install wakeonlan
#wakeonlan -i ip/dns -p port mac-adress
In my case
#wakeonlan –i annoying.dk –p 8000 00:41:63:DD:78:60
And it should say something like
Now, hopefully, it should start powering on your machine.
Another way to do it, its from a free service at depicus.com
which lets you power it on online from their site.
depending on your setup.
Or just go get their program from
If your looking for the windows way to set this up, I can recommend looking at
which should cover it all up.
Now. If all of this doesn’t work. You should try testing in on your local network first,
If it still don’t work. And you manually booted up the machine again
Check with “ethtool eth0” to see if it set itself back to “d†instead of g.
If its still set to g, it should really work. And I’m too lazy to write possible causes, so good luck.
Everything works pretty much out of the box if you shut down Linux with poweroff etc. as you usually do. But if the ac power is lost while the machine is powered down waiting for wakeup, the wake up-call won’t work anymore when the power is restored. The nic’s I guess sometimes seem to reset themselves and have to be set with ethtool again.
This can however easily be done with a small startup script, or similar ways which I wont cover up this time. (I will I probably update it later on if people bitch enough)
Now. If its set itself back to d, here’s a possible solution.
Edit /etc/init.d/networking and comment out
“ifdown -a –exclude=lo”
And it should do the trick. And yes, I have no clue at this point why it should work, so just hope for the best
all suggestions are welcome.
Enjoy!
Pingback: How To Remotely Turn On Computer from LAN and WAN » Raymond.CC Blog
Pingback: twinturbo.org » How to remotely turn on your computer
Pingback: Snagzone News - Whats New » Blog Archive » AWOL Or Not (Auto Wakeup on LAN)
#1 by Paul on December 16, 2007 - 6:23 pm
Quote
I am interested to shutdown a computer to reboot when it is hung or frozen XP over the internet.
How do I do that?
Thanks
#2 by admin on December 17, 2007 - 9:58 pm
Quote
Hi Paul
in these situations, theres not much todo, you’d need a hardware solution for that. most of those works pretty decent, pci card thats seperatly connected to the internet, where you got another application you can connect to with it, and remote reboot or power on/off.
#3 by alex on January 15, 2008 - 4:42 am
Quote
Online Wake-On-LAN – http://www.rshut.com/products/wol
allow to wake up remote computer over Internet, schedule option available.
Hope it can be helpful.