Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2

Author Topic: [SOLVED] Wake on Lan command from telnet/ssh?  (Read 9079 times)

bobis

  • Member
  • **
  • Posts: 18
[SOLVED] Wake on Lan command from telnet/ssh?
« on: August 14, 2017, 09:05:29 AM »

Hello, for some reason I cannot access my VMG3925 from https interface ( I am outside of my home for holidays, therefore my LAN and have only enabled ssh and https to be accesible from WAN/INTERNET) but I can access its ssh/telnet. In the web (http/htpps) interface, under home networking, you are able to wake on lan your local devices but since I cannot access it right now (Stuck on Performing TLS handshake) from web, is there any command I can issue via ssh/telnet for wol to work? I already searched google, nothing worked until now and I guess that they are special zyxel commands.
« Last Edit: August 16, 2017, 06:11:29 PM by bobis »
Logged

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: Wake on Lan command from telnet/ssh?
« Reply #1 on: August 14, 2017, 09:29:17 PM »

Sorry, I do not know how to achieve a successful WOL with a command via ssh.
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

sevenlayermuddle

  • Helpful
  • Addicted Kitizen
  • *
  • Posts: 5369
Re: Wake on Lan command from telnet/ssh?
« Reply #2 on: August 14, 2017, 10:31:58 PM »

I believe the command 'ether-wake' is present in many Linux distributions and some busyboxes.

You'd need to know that MAC address of the device you want to awaken.
Logged

bobis

  • Member
  • **
  • Posts: 18
Re: Wake on Lan command from telnet/ssh?
« Reply #3 on: August 15, 2017, 08:16:25 AM »

I believe the command 'ether-wake' is present in many Linux distributions and some busyboxes.

You'd need to know that MAC address of the device you want to awaken.

Code: [Select]
BusyBox v1.20.1 (2017-04-20 00:34:08 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

$ uname -a
Linux router 3.4.11 #1 SMP PREEMPT Thu Apr 20 05:09:53 CST 2017 mips GNU/Linux
$ ether-wake
-sh: ether-wake: not found
$ busybox ether-wake
ether-wake: applet not found
$

Well, as you can see , I am out of luck :( . I know the target MAC , wol is set perfectly.
« Last Edit: August 15, 2017, 08:19:05 AM by bobis »
Logged

d2d4j

  • Kitizen
  • ****
  • Posts: 1103
Re: Wake on Lan command from telnet/ssh?
« Reply #4 on: August 15, 2017, 09:00:22 AM »

Hi

I could be wrong sorry, but reading your post a few times, I believe your just trying to access the router in a web browser, but it is not responding.

If so, you do not issue WOL, you just need to reboot your router, which you would have to look up the correct command to do from shell, but on Draytek it is reboot adsl or adsl restart or similar (do not have to do this very often)

The other thing which comes to mind, if you run servers/services on https beyond the router, it maybe routed for these ports, so you may have changed your router port for https from 443 to say 8443 or whatever you changed it to

I hope that helps

Many thanks

John
Logged

sevenlayermuddle

  • Helpful
  • Addicted Kitizen
  • *
  • Posts: 5369
Re: Wake on Lan command from telnet/ssh?
« Reply #5 on: August 15, 2017, 09:11:47 AM »

I wouldn't give up.  If the router's GUI can send Wake On Lan, I'd expect it to be possible from command line too.  Sorry, I have no further specific suggestions to offer.  From googling terms like Busybox Wake on Lan I found a few discussions here and there, but not sure which would be credible so I''m not linking anything.

I use ether-wake in my CentOS server's back up scripts to awaken other systems before dumping their disks, but I probably had to install it as an additional package.   May have been over-optimistic to hope it would be there by default, esp in busybox, but I'm still betting there might be some other way...

Re d2d4j's post, sorry if I have misunderstood but posting anyway on the off-chance that I haven't.  :)
Logged

bobis

  • Member
  • **
  • Posts: 18
Re: Wake on Lan command from telnet/ssh?
« Reply #6 on: August 15, 2017, 09:16:08 AM »

Hi

I could be wrong sorry, but reading your post a few times, I believe your just trying to access the router in a web browser, but it is not responding.

If so, you do not issue WOL, you just need to reboot your router, which you would have to look up the correct command to do from shell, but on Draytek it is reboot adsl or adsl restart or similar (do not have to do this very often)

The other thing which comes to mind, if you run servers/services on https beyond the router, it maybe routed for these ports, so you may have changed your router port for https from 443 to say 8443 or whatever you changed it to

I hope that helps

Many thanks

John

Nice intention to help but I have already opened a whole thread about the rebooting part not possible on this gateway via ssh/telnet http://forum.kitz.co.uk/index.php/topic,20063.0.html?PHPSESSID=a05faa0be1c626673c167f8c92c1ed9d and no , no port changes have been made, I just want to boot my remote linux server (it is just a desktop/tower with ethernet and power connected, hosting 1 TB of my files, like a NAS, I know that I should have left it open but I just wanted it to rest a bit and save power since I was not using it all day and simply overestimated my gateway's power to wake it whenever I want)  located in the same network as router/gateway. And the https:/ site of the gateway is not timing out , just the "Performing a TLS handshake to {my_wan_home_host_here}".  Funny is that ssh/telnet access to the gateway from wan is ok.
« Last Edit: August 15, 2017, 09:24:31 AM by bobis »
Logged

d2d4j

  • Kitizen
  • ****
  • Posts: 1103
Re: Wake on Lan command from telnet/ssh?
« Reply #7 on: August 15, 2017, 09:39:23 AM »

Hi

@7lm - you were 100% correct and I was wrong sorry (must be getting too old)

Just a quick thought, which may or may not help but if you have WOL setup on server, and it's just that your router cannot send WOL command, have you tried routing the port directly to your server and issuing the WOL from your computer directly to the server

Many thanks

John
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43573
  • Penguins CAN fly
    • DSLstats
Re: Wake on Lan command from telnet/ssh?
« Reply #8 on: August 15, 2017, 10:10:33 AM »

The command referred to above is 'etherwake', not 'ether-wake'. It's in the Debian repositories, although not installed by default.
Logged
  Eric

tubaman

  • Senior Kitizen
  • ******
  • Posts: 12632
Re: Wake on Lan command from telnet/ssh?
« Reply #9 on: August 15, 2017, 10:27:25 AM »

I'm not sure if this applies to the 3925, but the CLI manual for the 1312 (https://support.aa.net.uk/images/6/6c/VMG1312-B10A_CLI_Reference_Manual.pdf) has some wake-on-lan options (called 'wowl') to the WLCTL command.
What is not clear is is WLCTL is directly available as it says 'wlctl –This command available in the Broadcom WLAN client utility'.
Logged
BT FTTC 55/10 Huawei Cab - Zyxel VMG8924-B10A

sevenlayermuddle

  • Helpful
  • Addicted Kitizen
  • *
  • Posts: 5369
Re: Wake on Lan command from telnet/ssh?
« Reply #10 on: August 15, 2017, 10:35:18 AM »

The command referred to above is 'etherwake', not 'ether-wake'. It's in the Debian repositories, although not installed by default.

On further investigation, it seems to be called 'etherwake' on Ubuntu/Debian, and 'ether-wake' on RHEL/CentOS/Fedora.   :)

So worth trying looking for both.

I'm not actually sure whether it was installed by default on my CentOS 7 box.  If somebody would care to tell me how to discover the answer to that question, I will happily provide it.
Logged

bobis

  • Member
  • **
  • Posts: 18
Re: Wake on Lan command from telnet/ssh?
« Reply #11 on: August 15, 2017, 10:41:00 AM »

I'm not sure if this applies to the 3925, but the CLI manual for the 1312 (https://support.aa.net.uk/images/6/6c/VMG1312-B10A_CLI_Reference_Manual.pdf) has some wake-on-lan options (called 'wowl') to the WLCTL command.
What is not clear is is WLCTL is directly available as it says 'wlctl –This command available in the Broadcom WLAN client utility'.

Code: [Select]
$ wlctl wowl
wlctl: wl driver adapter not found
$

Is it tied to the WLAN interface? My gateways wifi is currently disabled.
Logged

sevenlayermuddle

  • Helpful
  • Addicted Kitizen
  • *
  • Posts: 5369
Re: Wake on Lan command from telnet/ssh?
« Reply #12 on: August 15, 2017, 10:48:39 AM »

I noticed on my Billion router, /bin/wol

Since I like to live dangerously, rather than read what it does or even look at the options, I just tried it out and successfully awoke my sleeping XP box.  Syntax was as you'd expect....

wol aa:bb:cc:dd:ee:ff

Worth a try?

PS, Billion's 'wol' is clearly just a rename of ether-wake.  The usage messages is
# wol ?
ether-wake: The Magic Packet host address must be specified as
  - a station address, 00:11:22:33:44:55, or
  - a hostname with a known 'ethers' entry.
#
« Last Edit: August 15, 2017, 10:53:05 AM by sevenlayermuddle »
Logged

bobis

  • Member
  • **
  • Posts: 18
Re: Wake on Lan command from telnet/ssh?
« Reply #13 on: August 15, 2017, 10:54:22 AM »

I noticed on my Billion router, /bin/wol

Since I like to live dangerously, rather than read what it does or even look at the options, I just tried it out and successfully awoke my sleeping XP box.  Syntax was as you'd expect....

wol aa:bb:cc:dd:ee:ff

Worth a try?

PS, Billion's 'wol' is clearly just a rename of ether-wake.  The usage messages is
# wol ?
ether-wake: The Magic Packet host address must be specified as
  - a station address, 00:11:22:33:44:55, or
  - a hostname with a known 'ethers' entry.
#

Code: [Select]
$ wol aa:bb:cc:dd:ee:ff
-sh: wol: not found
$ etherwake aa:bb:cc:dd:ee:ff
-sh: etherwake: not found
$
  :(
Logged

bobis

  • Member
  • **
  • Posts: 18
Re: Wake on Lan command from telnet/ssh?
« Reply #14 on: August 16, 2017, 06:10:44 PM »

Ok, to close this thread, I finaly found a workaround called ssh tunneling that can be used even if you don't have https access from WAN due to TLS error, like my case and with this I mirrored the http localhost site of the  gateway to the localhost of my mobile (remote port 80 of gateway to localhost:8000 of my mobile device). Then, I just logged in and issued all my wakeonlans from its web interface as well as issued a reboot in order to fix its https.

If it was not for ssh tunnelling, I would never have done it but I would prefer to have elevated rights and more packets ready to use from ssh/telnet anytime than having to rely to workarouds like this.
Logged
Pages: [1] 2