Setting up a System w/ Wake-on-LAN and VNC?
andrebsd asks: "I'd like to make myself some sort of webpage where I could startup my system with 'Wake on Lan', and once it is started, use VNC to login. Once I'm done doing what I need the system for I would then like to shut it down again. I'm wondering how one might go about putting something like this together. VNC has various scripts for making that part work, but I haven't seen any scripts that can function as a 'Power on/Power off' button for a webpage. Thanks to anyone with any way of doing this." While there are helpful reference for Wake-on-LAN tools, how would you integrate all of these into a coherent system? How might one keep such a system (relatively) secure?
You'll need to lookup the precise specifications for WOL. Basically you simply send the MAC address three times to the target machine over UDP. Then the NIC wakes the computer up.
It's not very difficult to do this with a perl script or something similar that can be integrated into a web page.
Another alternative that may interest you if your target computer has access to a phoneline is "Wake on Ring". Some BIOS vendors (Abit was one) allow a modem to power on a PC after a specified number of rings.
Conformity is the jailer of freedom and enemy of growth. -JFK
Where is your "system"?
You do realize that Wake on LAN is a layer two protocol, right? I.e. it's an ethernet protocol that has nothing to do with IP, UDP, or TCP.
The webserver that is hosting this webpage will have to be on the same local area network [layer two] as your "system." So:
where the final arrow MUST be on the same local area network.The person who administers the webserver [the second to last point in the diagram] must give you sufficient rights to some daemon on that webserver so as to allow you to send out a layer two [ethernet] packet via that daemon. If you yourself are not the administrator of this webserver, the chances of you getting those kind of rights are between slim and none. The standard sandboxes, such as the Java sandbox, don't allow you to get anywhere near sending a layer two packet.
What's wrong with something simple? Throw a .htaccess in a directory with this (untested) script.2 3.123"; // or whatever
<html><body>
<?php
$machine="123.123.1
$connect="wakeonlan --wakeup $machine";
if($_REQUEST['connect']) {
exec($connect);
?>
Starting up <?=$machine?>.
<?php
} elseif(ping($machine)) {
?>
<?=$machine?> is up.
<?php
} else {
?>
<?=$machine?> is down. <a href="?connect=1">Start up</a>.
<?php
}
?>
</body></html>
Free Java games for your phone: Tontie, Sokoban
I use WOL to turn my Windows XP PC on by SSH'ing to my Linux server on the same LAN, then running the Linux WOL utility to turn the Windows PC on. Then I have the Terminal Services service running on the WinXP system on a non-default port where I can shut it down if I want to (using tsshutdn). It might also be possible to shut the system down remotely from the Linux system with Samba, but I've never tried that.
Trolls lurk everywhere. Mod them down.
Because of the handshake You cannot use TCP, but any UDP or ICMP (ping!) packet including the magic would do it. It has to pass the firewall (if any). The dest address could be
Read AMD whitepaper and a howto.
SMC routers have always had this. You can log into their web interface and get a listing of DHCP clients. You put a check next to the ones you want to wake, and press "Wakeup". Done!
Consequently, I have a 3Com 3C510 Home Gateway (not made anymore) and it can also do the same wake up functions (not surprisingly, since it contains the same internals as SMCs)
Not All Who Wander Are Lost