View Full Version : [SOLVED] - wake on lan/via the internet
Jan 29th 2008, 03:17 PM
since the plethora of replies to my previous attempt at getting help only served to confuse me ;) here another try.
Has anybody got wake on lan or preferably wake via the internet working? If so, would you like to share your experiences? I'm just trying to set it up and need all the help I can get. If anybody else is the same position we could work together...
Jan 29th 2008, 03:50 PM
any use to you?
Jan 29th 2008, 04:02 PM
packages I have installed so far:
ethtool - server side
wakeonlan - client side
Looks like etherwake does the same as wakeonlan.
Just found out that magic packets, the ones which wake up an enabled computer, are raw packages and can thus only be sent via lan, not the internet. But they can be inserted in these so that they can be sent to a router via the internet.
Now the router has to adjusted to forward magic packets. Here we can say that blessed are those who own a Linux router. The others either have the capability or have to buy a new router. I belong to the former (Linux is soooooooo cool) and I now have to figure out how to hack the router into submission ;D
Watch this space...
Jan 30th 2008, 08:17 AM
Server side recap
AFAIK you cannot wake up a wireless box, but a wired box can definitively be woken up by a wireless one.
You need to make sure that your BIOS supports wake on lan and enable it.
Also adjust your /etc/network/interfaces so get assigned a stable ip address in your own network. Here is a copy of mine for reference.
# The loopback network interface
iface lo inet loopback
# The primary network interface
iface eth0 inet static
Everything from "# The primary network interface" onwards makes my router assign this box the ip address 192.168.178.25
Now for the next stage.
BIOS works, so I enabled wol on the server side by installing ethtool. Here is how.
sudo apt-get install ethtoolUse ethtool to check whether your network card supports wol.
dicker:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
Advertised auto-negotiation: Yes
Supports Wake-on: pg
Current message level: 0x000000c5 (197)
Link detected: yesAs you can see I'm using eth0, your mileage may vary but you can find out which card you are using by a simple
sudo ifconfigSelect the if (interface) with a proper IP number next to it. If in doubt, ask.
From the above the following two lines are important
Supports Wake-on: pg
Wake-on: gIf you get a g in them you can proceed.
Insert the following into your /etc/rc.local to enable wol support even after a reboot
ethtool -s eth0 wol gTake care to select the right interface.
That is it, your computer is ready to be woken up over your internal network.
More to follow...
Jan 30th 2008, 06:20 PM
And nice 'How to' too
Jan 30th 2008, 08:28 PM
There's how to do it from the internet, what i really would like is to be able to do it from a wireless laptop, but doesn't look like it can be done
Jan 30th 2008, 09:48 PM
I'm doing it right now, left home, switched the box off, went to a mate's, logged myself into his wireless via my laptop, went to a web page and sent a magic packet to my dyndns and logged myself in my desktop with nx nomachine as if I were on my desktop :D
What you appear not to be able to do is wake up a box at home which is not wired to the router. At the server end you need a cable :P
But it is all down to your router 'cos that has to know where to forward the packet to.
As for a howto for routers - hardly possible 'cos they are all proprietary. Even if they run on Linux - documentatihon is hard to come by. Only a solid community of hackers (or an enlightened company) can help you. I had it easy, a good community :)
FYI - I've got a fritz.box, a German AVM router which runs on Linux. You can invoke telnet (not normally on for safety reasons) via the telephone (ain't that weird), install a lightweight ssh server called dropbear, kill telnet and you end up with a very basic cli interface including a version of everybody's favourite command line editor, vi 8)
But info for your own router is best gained from the relevant forum...
Once the router is properly configured to forward the magic packet to the correct local ip address you're laughing. And yes, the server should not be on dhcp, which I believe I didn't mention beforehand - have modified previous post to make it more comprehensible.
If you can think of more to put in there or can make it easier to understand please tell.
Jan 21st 2009, 12:35 AM
One thing to add to this useful thread:
when switching NICs, we ran into this issue:
...i.e. we had to wipe the entry/entries in /etc/udev/rules.d/70-persistent-net.rules so the machine could use the new NIC and not stay bound to the previous MAC address. Otherwise the new cards didn't function. (mentioned here since swapping cards is a likely activity when configuring WOL).
The trouble we're now having is that our 3Com 3c905-TX is workng fine, but ethtool doesn't show either the "Supports Wake-on" or "Wake-on" lines. (I know it supports it because it has a WOL cable attached to our motherboard). Thus we can't turn it on with ethtool. We tried the trick of booting into XP, enabling it, and then yanking the power, etc, but no change. Also tried adding the line "options 3c59x enable_wol=1" to the modprobe options file, no change.
It's an old thread, but if anyone has any tips, much appreciated... we're still hacking away at it...
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.