Remote Shutdown/WakeOnLAN of Unraid


Recommended Posts

this is a continuation of my previous topic about Scheduled Shutdown (http://lime-technology.com/forum/index.php?topic=29989.0), which went into a different direction as first anticipated.

 

with that said, this initial question goes out to archedraft, who suggested that i open a new thread to continue our discussion:

 

i already have the excellent ShareTool (http://www.yazsoft.com/products/sharetool/) running on my network, to allow me to access all of my network resources from the outside world (couldn't live my digital life without it, it's so good!)...are you aware of that particular Bonjour/VPN solution? i wonder whether with it running i might already have everything i need to utilize the solution you are proposing...but wouldn't i also need to run a ShareTool-type client on Unraid for it to be fully accessible, just like my computers are? or how else would i telnet into Unraid from the outside?

 

is there a particular plugin/extension that needs to be run on Unraid to make this work smoothly?

Link to comment

It sounds like you've already got your solution to this ==>  you're already set up to easily access your network;  so just do exactly what you're doing now;  then just access the UnRAID server from your desktop system (whether Mac or PC).    You can turn it on (via WOL);  and then just access it in the normal way.    This also preserves your current UnRAID security -- adding packages to remotely access always adds a bit of risk;  and since your remote access is already well-protected by ShareTool, I don't see much utility in adding another layer.

 

Link to comment

when you say "then just access the UnRAID server from your desktop system (whether Mac or PC)." do you mean directly from my computer while i am working on the road, or via Screen Sharing into a computer in my local network and then running a telnet session on that computer? or is there a way for me to make a direct VPN connection to my home network from my iOS device, and then telnet and send a magic packet to Unraid using the same method and IP as i would from within the network?

 

if you meant via ScreenSharing, i was hoping for something more elegant than that, like telnet'ing *directly* into Unraid from outside my network, from my MacBook Pro, or better yet, from my iPhone or iPad, just to start/stop Unraid...and i don't see how i would accomplish controlling it from one of my iOS devices, unless i am missing something obvious.

 

i understand that there is an increased security risk every time a port is opened to the outside world, but it is a calculable risk with the right precautions...the ends justify the means, in my mind...i *always* have my iPhone with me, wherever i am, but the same isn't true for my MacBook Pro...so if i could find a way to use my iPhone to accomplish the task of starting/stopping my Unraid, that would be a worthwhile goal.

 

so, if in my router, which is set up on dyndns to be reach-able as "servername.dyndns.org", i open up port - say - 55 to the outside and have that trigger port 7 on the inside, and route that port to IP 192.168.2.XX (which my Unraid occupies), then shouldn't i be able to connect to servername.dyndns.org:55 and issue a magic packet to it? using the mWOL app from my iPhone, it just doesn't seem to hit the server.

 

i'll keep experimenting a bit to see whether i can get this "direct connection" from the outside to work, but if you have any other ideas, or if i misunderstood something, do let me know.

Link to comment

I gathered from your initial description that you would be connecting to another PC at home anyway.  If that's not the case, then yes, you'll want to send a remote WOL packet and then telnet directly to the UnRAID server.

 

I don't use mine that way => I use LogMeIn to log into my primary desktop;  then send a WOL to UnRAID; and then if I want something off of the server, I upload it via the desktop.    I like to keep my UnRAID system "pristine" in terms of other add-ons ... so I don't have it set up for any web-based access.

 

Link to comment

@tillkrueger, do you run any machines at home that are online all the time?

 

If it's a unix based machine this may not be that hard to do with port knocking on your router or something like that.

If you run a webserver anywhere it can also be done with that.

 

There are unix command line based WOL clients, although I do not know about the apple platform, I'm sure some exist.

You can set something up with inetd so that when you connect to the port, it runs a command automatically that does a WOL.

 

Do you have anything virtualized anywhere?

Perhaps a more capable router, or a rasberry pi or something for inbound access.

Link to comment

my router is a Cisco EA6500AC...one of the more capable models, especially when flashed with dd-wrt (which i haven't done yet with this one, but others before this one).

 

i usually do have one machine (an iMac) running when i am not here, but have done so only because it's been the only way i've been able to get into my network from the outside and then deal with my Unraid...but since my electricity bill has been right at the cusp of Tier1/2 going into Tier 3, those extra 100KW a month cost me almost as much as the first 300KW my household use (12-14c per KWH vs 34c per KWH)...so my thinking was that if i could figure out a way to deal with the Unraid directly, only when needed, and not have to run the iMac at all, i'd be saving over 100KWH per month, which is about $35/month...not exactly chicken-feed, in my mind, anyway...so that's why i would be willing to take on the extra risk of opening up a port to the Unraid server.

 

the fact that i am total command-line simpleton doesn't make any of this easier...all i can do is keep asking questions, spend an hour or two a day issuing google searches, and try out what i find in a hit and miss fashion...without the help of this great forum and you amazing people, i'd be dead in the water with any of this, but since you do exist, i keep hoping that i'll stumble upon a solution that will save me over $400/year.

 

i am reluctant to flash my router with DD-WRT, as i have it configured pretty nicely right now...but it has been giving me random problems lately that make me a little more prone to give it a shot...but even then, i am not sure that i'll know how to move on from there...all this Telnet, SSH and WOL stuff is *really* foreign to me!

Link to comment

A bit outside the box, but there is another way to do what you want, and it might even give you some additional capabilities you might like ...

 

(a)  Buy an Insteon Hub [http://www.smarthome.com/2242-222/INSTEON-Hub/p.aspx ]

 

(b)  Buy an X-10 appliance module  [ http://www.smarthome.com/2002/X10-AM466-or-PAM02-X10-3-Pin-Appliance-Module/p.aspx ]

 

©  Plug the iMac into the appliance module, and turn the appliance module on.

 

(d)  Set your iMac's BIOS (or for that matter your UnRAID's BIOS if that's the only system you really need to turn on) to "Always On" in the ACPI power settings.    With this setting, if the system has power, it will turn on.  If you shut it down, it will stay off until the next time power is removed/re-applied => so when you shut it down you'll also want to turn off the appliance module after the system has had time to cleanly shut down.

 

Done :-)

 

Now you can turn the system on from your tablet/smartphone from anywhere in the world  :)

 

... and, of course, you can also add additional modules to do all kinds of nifty home-automation tasks  :)

  • Like 1
Link to comment

It reads as if the best way to do this is to update the router with DD-WRT and setup a VPN that way.

 

Another choice is a much smaller machine like a Raspberry PI as a VPN machine.

 

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=36&t=46961'>http://www.raspberrypi.org/phpBB3/viewtopic.php?f=36&t=46961

http://lifehacker.com/5978098/turn-a-raspberry-pi-into-a-personal-vpn-for-secure-browsing-anywhere-you-go

http://raspberrypihelp.net/tutorials/21-pptp-vpn-server-raspberry-pi

 

Do s'more searching on it.

http://www.raspberrypi.org/

 

The raspberry pi machines run off a USB power supply, surely you have some of those around.

http://www.newegg.com/Product/Product.aspx?Item=9SIA1ZY0K71724

 

I really don't know much about them, but it seems like that would be the lowest power solution which could pay for itself in a few months.

 

i.e. Other then, updating your router with DD-WRT.

 

There are plenty of other VPN router/firewall hardware devices too.

 

Link to comment

A little Rasberry Pi system would indeed be a nifty way to do this => they draw 700ma at 5v ... about 3.5w, which works out to about 2.5 kwh/month  :)

 

Not sure what packages you can run on them to allow remote access, etc. => but as long as they can be configured to allow remote access and to send a WOL packet, it would be a very low-power solution !

 

I've been toying with buying one of these "just because" ... but really don't have any use in mind, so haven't done so [yet  :) ]

 

Link to comment
my router is a Cisco EA6500AC..

 

According to the docs I found, there are two usb ports on it. Chances are you could power the Raspberry PI from the USB 3.0 port or from a combo cable for the two usb ports. It would save a wall wart.

 

 

You also have the choice of running a light weight webserver and using port knocking to open the port on demand.

Then using a command line program to do the WOL from a browser.

 

or setting up the VPN software so you can access your internal network as if you were part of it.

Link to comment

Chances are you could power the Raspberry PI from the USB 3.0 port or from a combo cable for the two usb ports. It would save a wall wart.

 

That should be okay; but note that the Rasberry Pi requires 700ma, whereas the USB spec only requires a 500ma capability => I've seen quite a few PC's where the USB ports were blown by folks drawing too much current (usually by using a passive hub).

 

 

 

Link to comment

Just noticed you referred to the router's port as USB v3 => if that's in fact the case, then the power spec is 900ma, so there's no issue powering a Rasberry Pi.

 

However -- the user's guide for the router just refers to "USB" (no version);  the specs on Newegg's site show USB v2 [http://www.newegg.com/Product/Product.aspx?Item=N82E16833124470 ]; and I can't find anywhere that calls the ports v3 ports.    Do you have a newer version of the specifications?

 

As I noted above, I suspect the Pi would work fine anyway -- the 700ma is likely a max draw, and with the usage outlined here it's unlikely it would hit that.    But it's just something to be aware of.

 

Link to comment

That's why I made mention of a dual usb power cable. It would provide the power of both ports.

I've done this allot with phones, hard drives and USB laptop monitors.

 

Since there would hardly be any GPU activity, I'm sure it would be fine.

choices are, use the USB 3.0 port for power (900ma) or use a dual USB A to Micro B cable to be sure you will never run out of power. It should supply 1A at a minimum. (500ma+500ma).

 

Although the spec on newegg does not say USB 3.0, You can tell it's USB 3.0 by looking at the color of a port in the docs.  This may not be accurate, in which case, the dual to micro B will work.

 

Then again, how many of us have spare cell phone chargers?

Link to comment

I found a doc on the Linksys site that shows what you're talking about => one port is blue; one black.  As you know, the blue one is likely USB v3 => but the document is completely silent about that ... and I'd certainly expect it to mention v3 if that was the case.

 

The ports shown on the Newegg pictures are both black.    So perhaps there's a newer version of the router with one v2 and one v3 port.    In either case, your idea of a dual cable would certainly do the trick;  and as I noted above, I doubt the Pi would be exceeding 500ma anyway for this usage, as it wouldn't be putting ANY load on the graphics elements.

 

Link to comment

you guys are amazing! i went to sleep for a night, and wake up to this plethora of options, neatly presented to me...i'll have to spend a couple of hours to peruse the links and solutions suggested to me, but just as a positive side-note: i have just checked my power consumption charts for the past week, and have seen a drop from 14kwh/day to just over 8kwh/day since putting my iMac to sleep at nights, my Unraid powered down unless needed for the brief periods of retrieving/backing-up files, my M-Audio studio monitors powered off unless i absolutely *need* to listen to my music library in high quality and at higher volume than my iMac provides to me.

 

from 14 to 8...that's *huge*...that's a $40/mo saving right there!

 

btw, i didn't always have to be this frugal, but since my brain-cancer operation almost 4 years ago, and fighting my way back into a career that was all but lost as a result of it (not to speak of my life, which was given a 2% chance of surviving), i have had to start thinking about every $ i spend...so hence this effort to save a few bucks every month...

 

thanks to you fine folks, it's a process that is actually more fun than chore.

goes to show, once again, that friends, family, and well-meaning humans are really all we have in this life :)

Link to comment

and btw. my Cisco is the first version of the router, which has two black USB ports, so the dual-USB cable solution would be best, should i go that route...just not sure that i want to get into yet another hardware platform...my life is already complicated enough, in terms of my reliance on technology ;)

 

The other choice was to update the router with DD-WRT or some other device that could do the VPN the way you want.  With the DD-WRT route you would not have to purchase anything, However you may need to expose login ability on the router.  See if you can upgrade the firmware and if the current router can do the VPN ability directly.  However, I'm not sure (just because I do not know) if you can send the WOL magic packet over the VPN or if it has to be run on a host that is part of your network locally.

 

Check out these links.

http://www.dd-wrt.com/wiki/index.php/WOL

https://www.flashrouters.com/blog/2012/10/24/wake-on-lan-wol-how-to-activate-use-it-with-dd-wrt/

Link to comment

thanks to you fine folks, it's a process that is actually more fun than chore.

goes to show, once again, that friends, family, and well-meaning humans are really all we have in this life :)

 

Hat's off to your health man!!! Live Long and Prosper  .\\//

 

Ditto.  You've had a tough road, but it sounds like you've made it to the 2% !!

 

... meanwhile, WeeboTech's idea actually beats the 2.5kwh/month I said was "tough to beat" !!  [flashing the router results in ZERO extra load -- THAT is a number you won't beat  :) ]

 

Link to comment

oh brother...what have i done?!

 

i've flashed at least half a dozen older Linksys routers to DD-WRT, but when i just tried to do the same to this much more modern EA6500AC, it went dark after the firmware uploaded, and has become entirely unresponsive...looks like i bricked my almost new Cisco! bummer!

 

i posted to the appropriate thread on the WW-DRT forum, and hope that someone will have some tricks to try, but a router that went dark during firmware flashing is *not* a good thing!

 

so much for not having to buy anything else...might have to replace this beautiful $120 router now...but here's to hoping! i have beaten the odds before, so maybe i'll be lucky again ;)

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.