shutdown on lan

Post new topic   Reply to topic    DD-WRT Forum Index -> Generic Questions
Goto page 1, 2  Next
Author Message
franzo15
DD-WRT Novice


Joined: 30 Sep 2008
Posts: 24

PostPosted: Wed Dec 03, 2008 14:46    Post subject: shutdown on lan Reply with quote
Is it possible to add a service to have shutdown on LAN in ddwrt firmware?
Sponsor
olmari
DD-WRT Guru


Joined: 24 Oct 2006
Posts: 1447
Location: Finland

PostPosted: Wed Dec 03, 2008 16:52    Post subject: Reply with quote
Define shutdown? You can add script that takes an LAN-port out of VLANs alltogether, rendering that particular port unusable until readded to VLAN again.

This affects ofcourse only physical port of DD-WRT router, you can't control computers that are connected to (another) switch or hub.
franzo15
DD-WRT Novice


Joined: 30 Sep 2008
Posts: 24

PostPosted: Wed Dec 03, 2008 19:16    Post subject: Reply with quote
Thanks for the reply.

For shutdown on Lan I mean to power off the PC that is connected (via rj45 or wifi) to the network.
olmari
DD-WRT Guru


Joined: 24 Oct 2006
Posts: 1447
Location: Finland

PostPosted: Wed Dec 03, 2008 20:23    Post subject: Reply with quote
Not doable by router, only thing there is to that is some sort of remote controlling software, and those has nothing to do with networking hardware...
cyberde
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1488
Location: the Netherlands

PostPosted: Wed Dec 03, 2008 22:13    Post subject: Reply with quote
Well I've done it :P

I've created a windows service that allows you to shutdown the pc by telnet.
And it's easy to create a bash script that issues these commands through a telnet session.
You can run those bash scripts through the webgui (eg http://192.168.1.1/user/shutdownpc1.sh).

It comes in very handy when I remotely booted a pc and want to shut it down again when I'm done.

So it can be done Smile

_________________
Firmware: DD-WRT v24-sp2 (latest available) mega
WRT320N

Donater
olmari
DD-WRT Guru


Joined: 24 Oct 2006
Posts: 1447
Location: Finland

PostPosted: Thu Dec 04, 2008 7:40    Post subject: Reply with quote
cyberde wrote:
Well I've done it :P

I've created a windows service that allows you to shutdown the pc by telnet.
And it's easy to create a bash script that issues these commands through a telnet session.
You can run those bash scripts through the webgui (eg http://192.168.1.1/user/shutdownpc1.sh).

It comes in very handy when I remotely booted a pc and want to shut it down again when I'm done.

So it can be done Smile


Yes, well, this is exactly as I said too :p
cyberde
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1488
Location: the Netherlands

PostPosted: Thu Dec 04, 2008 13:12    Post subject: Reply with quote
Yea, I didn't say you were wrong did I? Razz
I will try to upload my service tonight for those who are interested.

_________________
Firmware: DD-WRT v24-sp2 (latest available) mega
WRT320N

Donater
franzo15
DD-WRT Novice


Joined: 30 Sep 2008
Posts: 24

PostPosted: Thu Dec 04, 2008 13:51    Post subject: Reply with quote
thank so much cyberde.....i'm very interested at this service...
cyberde
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1488
Location: the Netherlands

PostPosted: Thu Dec 04, 2008 14:17    Post subject: Reply with quote
franzo15 wrote:
thank so much cyberde.....i'm very interested at this service...

No problem, I'll compile an english version tonight when I get home. And I'll also upload a sample bash script to connect to this service.

_________________
Firmware: DD-WRT v24-sp2 (latest available) mega
WRT320N

Donater
cyberde
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1488
Location: the Netherlands

PostPosted: Thu Dec 04, 2008 17:14    Post subject: Reply with quote
I've added the service in a ZIP-file. This ZIP-file also includes a Readme on how to setup.

To access this service from your router you can create a bash script containing the folowing:

Code:

#!/bin/sh

PASSWORD=mypassword
HOST=192.168.1.106
PORT=1254

(echo $PASSWORD; sleep 1) | telnet $HOST $PORT

You ofcourse have to change the variables to your needs, eg the password and port must be the one set in svcRemoteShutdown.ini. And host is the host where the service is running.

Good luck Smile



RemoteShutdownService.zip
 Description:

Download
 Filename:  RemoteShutdownService.zip
 Filesize:  253.58 KB
 Downloaded:  1373 Time(s)


_________________
Firmware: DD-WRT v24-sp2 (latest available) mega
WRT320N

Donater
der_obi
DD-WRT Novice


Joined: 08 Feb 2009
Posts: 1

PostPosted: Sun Feb 08, 2009 23:32    Post subject: standby/hibernate ? Reply with quote
Hello,

cyberde can you compile a program "standby/hibernate" (not shutdown) ?

Thx

der_obi

P.S.: sorry for my bad english (i´m german) Wink
cyberde
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1488
Location: the Netherlands

PostPosted: Wed Feb 11, 2009 21:11    Post subject: Reply with quote
I'll have a look at it tomorrow if I can add some spare time Smile
_________________
Firmware: DD-WRT v24-sp2 (latest available) mega
WRT320N

Donater
Machito
DD-WRT Novice


Joined: 06 May 2009
Posts: 1

PostPosted: Wed May 06, 2009 14:10    Post subject: Reply with quote
Cyberde this is really nice and useful app!

I just flashed my Asus WL-520GC with DD-WRT, Wake-on-LAN works fine and this is exactly what I needed, possibility to remotely shutdown PC.

But the option to standby/hibernate would be really appreciated by me. I also wrote some applications in Delphi for scheduled shutdown, but I don't have any experiences with terminal applications/services programming. Maybe you still have a source code somewhere?

Adding an option in svcRemoteShutdown.ini for shutdown/standby/hibernate would be great.

Thank you. Smile
cyberde
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1488
Location: the Netherlands

PostPosted: Wed May 06, 2009 18:04    Post subject: Reply with quote
I totally forgot about my previous post, so I quickly edited the application. You'll find the new version attached.


RemoteShutdownService.zip
 Description:

Download
 Filename:  RemoteShutdownService.zip
 Filesize:  248.88 KB
 Downloaded:  1251 Time(s)


_________________
Firmware: DD-WRT v24-sp2 (latest available) mega
WRT320N

Donater
bexley
DD-WRT Novice


Joined: 03 Dec 2008
Posts: 16

PostPosted: Sun Dec 06, 2009 17:41    Post subject: Reply with quote
olmari wrote:
Define shutdown? You can add script that takes an LAN-port out of VLANs alltogether, rendering that particular port unusable until readded to VLAN again.

This affects ofcourse only physical port of DD-WRT router, you can't control computers that are connected to (another) switch or hub.


hi, can anyone post a copy of that script or tell me what to do? i'm desperatly trying to shutdown my lan ports but i cant i dont have the web gui tab for some reason and i cant find a way to do it on the cli

thanks!!
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Generic Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum