Wake-on-LAN-Tool

About

Though I wrote this for my Fritz!Box, Wake-on-LAN-Tool is a simple script which allows you to start your computer from the internet using any Linux router.
All you need is a Webserver with PHP and Cronjob support in you Linux router.

Setup on a Fritz!Box with Freetz

(If you run a Linux router you should be able to figure things out using this information and the hint below)
  1. Grab the latest Version and edit wol.php:
  2. Set a different cron-password than HACKME
  3. Enter your computers' MAC addresses (Don't know how to find out your MAC address or what this is? Please ask Google and/or Wikipedia ;-).
    Hint: The name you choose for each computer doesn't matter, as long as it is unique. This means you do not have to expose any hostnames!
  4. Upload wol.php, wol.stats and wol.hosts to your webserver. Make sure wol.stats and wol.hosts can be modified by PHP/the webserver!
  5. Open wol.php on your webserver and generate the crontab, copy it (you know, right click -> copy ;-)
    Linux users: Now it gets fritz.box specific, you may jump to the hint below this.
  6. Now, open the Freetz Webinterface and login.
  7. First we want to edit some settings, so open the settings menu entry and make cornd start automatically. Don't forget to apply the changes :P
  8. We need to modify the crontab, so, find it in the menu, open it and paste the crontab generated in step 5. Once again, apply the changes.
  9. Finally, open the daemons page and start crond.
  10. Done, you should see updates on wol.php every now and then, including you internet IP and how many seconds ago it was.

Hints for Linux users:

Besides a cron-daemon you need something like ether-wake on your router. On Ubuntu the package is called etherwake, as well es the binary itself. So you need to modify the PHP script to generate a shell script which uses etherwake instead of ether-wake.

Known Bugs/Issues

The only bug I experienced so far is that my notebook (Ubuntu) is unable to access my webserver (time out) if the cronjob runs regulary (every minute in my case), though an open SSH session still persists. But my Desktop Computer (Gentoo) works just fine (and both have exactly the same setup, dhcp...). I have no clue whats wrong there, but if you have the same problem and are able to track it down you are welcome to help me out on this ;-)

Download

Version 1.1, Feb, 15th 2009
Version 1.0, some days older

History

Version 1.1: Added Crontab Generator, using only crontab and not some local script on the router anymore.
Version 1.0: Initial Release.

Contact

You may contact me by mailing to public at [this sites domain without the dev-thing]. I hope you are more intelligent than a spam bot ;-).
I have Blog, though it is only updated on a irregular basis and its primary language is German...