I want to WakeOnLAN my NAS server remotely, but my router blocks WOL packets. I thought I could circumvent this by ssh'ing into our androidTV box, and sending a WOL packet from there on the LAN. I can ssh into the androidTV, but can't send the WOL packet. Is it possible to run a graphical ssh session to the androidTV and then use one of the WOL apps in the Play Store? Or is there any way I can use a WakeOnLan application from terminal?
I have figured out the solution as I was trying to achieve the same thing.
Problem: I need to remotely power on my server at home using Wake on Lan (WoL) command. For WoL to work reliably, a PC within the LAN needs to be used to send the WoL command, and NOT a remote PC. I don't completely understand the reason why, but it has something to do with the router clearing the ARP table cache after a device is powered off. In our case, the server that is switched off but we want to remotely turn it on. For more details read here: https://serverfault.com/questions/161560/how-to-get-wake-on-lan-working/349783#349783
Solution You can have a device within the LAN which can send the WoL command to the powered off server. One way to do this is by having a rooted Android device which is running a SSH server. You can remotely login to the Android device using SSH and then send the WoL command.
Steps I used
ssh -p 2222 [email protected]
ether-wake -b -i wlan0 XX:XX:XX:XX:XX:XX
. Reference: https://forum.xda-developers.com/showthread.php?t=2495288 ssh -p 2222 [email protected] "su -c ether-wake -b -i wlan0 XX:XX:XX:XX:XX:XX"
Note:
wakeonlan
command. You have to use ether-wake
command. This is because BusyBox doesn't install wakeonlan
. ether-wake
command If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With