Slashdot Mirror


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?

7 of 74 comments (clear)

  1. Um, too obvious? by tunah · · Score: 4, Interesting

    What's wrong with something simple? Throw a .htaccess in a directory with this (untested) script.
    <html><body>
    <?php
    $machine="123.123.12 3.123";
    $connect="wakeonlan --wakeup $machine"; // or whatever
    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
  2. always-on appliance with an IP address by Futurepower(R) · · Score: 3, Interesting

    Maybe one piece of the puzzle of making Wake-on-LAN over VNC work would be to have a DSL modem, and some kind of always-on appliance that could be programmed to turn on the computer. The appliance must have an Internet address. This is the idea, but it is too expensive: Internet Power Switch. Maybe this would be better: 1-Port Serial Device Servers, but no price is listed.

    You have a good basic idea. You don't want to leave the computer on all the time, but you would like to VNC the computer when you need it. Actually, I want that too.

    All you need is a low-voltage switch with an Internet address. You can adjust the OS to turn on when the power switch is pressed and hibernate if the power switch is pressed, if the computer is already on. If you need a cold re-boot, you can run the shutdown command from VNC, using a time delay.

    A switch with an Internet address need cost no more than $50. The question is, who sells such a switch?

    1. Re:always-on appliance with an IP address by 3waygeek · · Score: 3, Interesting

      Another alternative is an APC Masterswitch; it allows you to control multiple devices via web or telnet. It also works with an APC UPS to allow you to control how your systems behave when the power goes out (i.e. shut down non-essential boxen immediately to preserve battery power for the essential ones).

      You can pick up one on eBay for a few hundred dollars, which works out to less than $50 per switched device.

      I picked up a Masterswitch Plus (basically a switch with a serial port that can signal a computer to do an orderly shutdown) for about $300 on eBay about 6 months ago, and use it to control several computers and my network hardware.

  3. Can be done with GSM by krishnaD · · Score: 2, Interesting

    If you want to do it with GSM and SMS, you will have less things to worry about and more control. I had something similar to control el. devices using GSM. Take a cheap cellphone, take an Atmel or a philips micro-cont, poll the cell phone using handmade module and connect a live circuit, as soon as predefined sms comes complete the circuit. Depending on the controller you use, you can control up to 8 devices.

  4. Any cheap routers capable of sending WOL? by WoTG · · Score: 3, Interesting

    I see lots of posts for using a local server that is always. I guess this will work for a lot of techie places... but what about everyone else?

    Are there any cheap routers that can send a simple WOL message? Are there any that have been hacked so that someone can add this function?

  5. Re: it's not IP, so it won't get routed by graf0z · · Score: 5, Interesting
    I have to correct myself: You may use ANY packet You want (IP, IPX, whatever), as long as it

    • contains the "magic sequence"
    • is contained in a valid ethernet frame
    • is address to the target's MAC- or a multicast address (including broadcast).

    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

    • unicast if the last router has a static arp entry for the dest
    • broadcast if the last router forwards broadcast packets
    • multicast if You have a multicast routing path from You into the last subnet.

    Read AMD whitepaper and a howto.

    /graf0z.

  6. APC 9210 power switch by toygeek · · Score: 2, Interesting

    Get an APC 9210 power switch off Ebay. Then make sure that your system turns on immediatly when power is applied. Login to the power switch, turn on the power to that box, and viola.

    We use these where I work for remote control of systems that have to be cold-booted every so often.