FreeNAS as WOL "server"

Status
Not open for further replies.

Jack Naisbett

Explorer
Joined
Jan 8, 2016
Messages
69
Hi,

I was wondering if a plugin exists for freenas that can send wol packets to other lan devices? I'm looking to be able to wake across the Internet, but my superhub doesn't support wol in any sense - no static arp tables nor broadcasting to subnet.

My idea was that i could either send a command/packet to freenas over the web since it'll be on 24/7, or login to some kind of web plugin on freenas, and then wake a client.

Is this possible / been done? I did search but couldn't see anything that quite matched my question.

Thanks

Jack
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Yes, try to type man 8 wake to see the man page on how to use this command ;)
 

Jack Naisbett

Explorer
Joined
Jan 8, 2016
Messages
69
Right, got that. Any recommended approach how I can make a shortcut to launch it from say an Android phone? I'm thinking some kind of ssh client and a macro, but didn't know if there's a better way of doing it!
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Right, got that. Any recommended approach how I can make a shortcut to launch it from say an Android phone? I'm thinking some kind of ssh client and a macro, but didn't know if there's a better way of doing it!

You may find it convenient to have a script installed in your home directory on the FreeNAS system, so that you can ssh in and run "wake-desktop" or "wake-kids-pc".

That's more likely to be something you could easily create a shortcut for via an SSH client as well, but that's going to be entirely dependent on the SSH client.
 

Jack Naisbett

Explorer
Joined
Jan 8, 2016
Messages
69
I've found it needs sudo to run, so I've put it in sbin and put my user into an "admins" group which I gave permission to sudo. I have also added the script to the sudoers file so that it can be run without password.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
You really don't want to put anything in sbin because that will not survive an upgrade/reinstall.
 

Jack Naisbett

Explorer
Joined
Jan 8, 2016
Messages
69
Ah, perhaps I should make my script call the sudo so that I can run the script from my accounts bin...why I didn't do that to start with i dont know!
 

Jack Naisbett

Explorer
Joined
Jan 8, 2016
Messages
69
i've now put the script back in the user's home bin directory, and added the script file to sudoers for that user. I've also set up an ethers file to be used for name resolution to MAC.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Hopefully also the ethers file is in the home directory. Big bonus for calling it an ethers file, a mostly forgotten relic of the old days.
 

Jack Naisbett

Explorer
Joined
Jan 8, 2016
Messages
69
I had edited the one in /etc/ethers for testing, my next question was to ask how I configure wake to use a different one! I've had a look on the man pages for the commands and I'm still not sure how to point it to my own ethers file.
 
Status
Not open for further replies.
Top