Wake On Lan

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
rslarsen
DD-WRT Novice


Joined: 23 Dec 2011
Posts: 7

PostPosted: Mon May 21, 2012 6:53    Post subject: Wake On Lan Reply with quote
Hi
I want to use WOL on my Linksys E4200 with Firmware: DD-WRT v24-sp2 (03/19/12) mega. I have also followed this tutorial at http://www.dd-wrt.com/wiki/index.php/WOL. Tried to use "arp -i br0 -s 192.168.1.254 FF:FF:FF:FF:FF:FF" but when I use this script my router freeze/stop working have to da a 30/30/30 reset then.
All settings in portforward should be correct (I hope)
See pics.

If I try to wake my computer at home it works ok, but if I try to do the same from Internet outside my home(using Ipad 3'rd 3G network) it won't work. Using DynDNS hostname.
Why???

My MB is SABERTOOTH X58 and it has the PCI/e wake up future. In Windows 7 lan settings is Shutdown Wake On Lan enabled, also Wake on Magic Packet enabled, also enabled to wake up magic packet in power settings for network card.

/Rene



Wol2.jpg
 Description:
 Filesize:  33.86 KB
 Viewed:  7085 Time(s)

Wol2.jpg



wol1.jpg
 Description:
 Filesize:  4.64 KB
 Viewed:  7085 Time(s)

wol1.jpg


Sponsor
James2k
DD-WRT User


Joined: 23 Oct 2011
Posts: 394

PostPosted: Mon May 21, 2012 12:29    Post subject: Reply with quote
Your port forward needs to be whatever IP address you chose for the static ARP entry, in this case it would be 192.168.1.254.

It has to match the ARP command otherwise the WOL command can't be forwarded from the WAN side.

You need to put this into your startup script:

Code:
arp -i br0 -s 192.168.1.254 FF:FF:FF:FF:FF:FF


Running that command shouldn't crash your router. Try running it in an SSH session.

_________________
James



Routers:
Asus RT-N66U - K3.x v24-sp2 (12/17/13) big 23194 (BrainSlayer) - Main Router
WNR3500L - K26 v24-sp2 (08/19/13) kongmod 22200M (Kong) - OTRW2 Test Unit
Belkin F5D7230-4 - K24 v24-sp2 (12/24/09) micro-plus-ssh 13491M (Eko) - Access Point
2x WNR2000v3 DD-WRT v24-sp2 (03/08/12) std 18777 (BrainSlayer) - Repeater Bridge
rslarsen
DD-WRT Novice


Joined: 23 Dec 2011
Posts: 7

PostPosted: Mon May 21, 2012 13:47    Post subject: Reply with quote
I have used this code arp -i br0 -s 192.168.1.254 FF:FF:FF:FF:FF:FF in my startup script.
(Then the router freezes)
How do I SSH to my router, I have Putty on my computer, so I Can Telnet my nas. What is the router's ip? I am not good at Telnet, so please help me...

I have also forwarded 192.168.1.254, UDP port 9
Or should I forward my computers ip too, to port 9?


/Rene
James2k
DD-WRT User


Joined: 23 Oct 2011
Posts: 394

PostPosted: Mon May 21, 2012 17:42    Post subject: Reply with quote
You need to enable SSH first in Services under the Secure Shell section. SSH is far better than telnet to use as it is more secure. Your IP address to your router (if you haven't changed it) is 192.168.1.1, use that to make a connection via Putty.

The username is root and the password is whatever you set when you first setup the router with DD-WRT (as in since last 30/30/30 reset)

Try running the ARP command again in the SSH Console. If the router becomes un-responsive or the SSH Connection breaks then you might want to consider trying another build, I can assure you that running the command in the WOL tutorial shouldn't bring down your router, it is literally only a static ARP entry. If there isn't a specific reason why you a running the SVN build you are now, I'd suggest you switch to the recommended build of 14929 as described in the Peacock thread as this build is a very stable build and has little to no bugs as commented by the community and you have my personal experience that it is very stable, as I have been running it on my Netgear WNR3500L for over 8 months without any problems.

If you don't want to change builds, continue reading on:

Sometimes executing commands can make a router seem like it has crashed when in fact it is just temporarily unavailable due to configuration change, make sure you are giving your router time to apply the ARP entry. Certain config changes will often temporary bring down network interfaces etc, but they come back after several seconds. Make sure you are giving your router time.

Your port forwarding setup isn't working due to your router seemingly crashing once the ARP command is executed. The actual entry isn't being created due to the crash.

You do not need to port forward ANY of you computers/devices on the network, the idea is you create a static ARP entry (which is port forwarded) which allows you to send WOL commands from the WAN side which get passed to the LAN. This is why most stock firmware can't do WOL from outside the LAN as you need to have a way of forwarding the WOL requests from WAN to LAN. In most cases these request will be blocked, hence the need for a static ARP entry that listens for WOL packets from the outside.

Hopefully this helps you continue troubleshooting and getting the desired result.

_________________
James



Routers:
Asus RT-N66U - K3.x v24-sp2 (12/17/13) big 23194 (BrainSlayer) - Main Router
WNR3500L - K26 v24-sp2 (08/19/13) kongmod 22200M (Kong) - OTRW2 Test Unit
Belkin F5D7230-4 - K24 v24-sp2 (12/24/09) micro-plus-ssh 13491M (Eko) - Access Point
2x WNR2000v3 DD-WRT v24-sp2 (03/08/12) std 18777 (BrainSlayer) - Repeater Bridge
rslarsen
DD-WRT Novice


Joined: 23 Dec 2011
Posts: 7

PostPosted: Tue May 22, 2012 6:54    Post subject: Reply with quote
Hi James2k

Thanks for your answer, I have tried your solution. It won't work. So for now, I will not use more time on my problem.
Thanks again...

/Rene
James2k
DD-WRT User


Joined: 23 Oct 2011
Posts: 394

PostPosted: Tue May 22, 2012 8:27    Post subject: Reply with quote
Hi,

I can only advise that you try flashing a different build to something more stable as I was referring to in my previous response. When you feel like trying again that would be my recommendation.

Good luck

_________________
James



Routers:
Asus RT-N66U - K3.x v24-sp2 (12/17/13) big 23194 (BrainSlayer) - Main Router
WNR3500L - K26 v24-sp2 (08/19/13) kongmod 22200M (Kong) - OTRW2 Test Unit
Belkin F5D7230-4 - K24 v24-sp2 (12/24/09) micro-plus-ssh 13491M (Eko) - Access Point
2x WNR2000v3 DD-WRT v24-sp2 (03/08/12) std 18777 (BrainSlayer) - Repeater Bridge
rslarsen
DD-WRT Novice


Joined: 23 Dec 2011
Posts: 7

PostPosted: Tue May 22, 2012 10:48    Post subject: Reply with quote
Hi James2k

I have read Peacock thread about flashing, but ad I read the guide, then I won't be able to use the verion 14929 as you write. Peacock writes that Linksys E4200 has to be flashed with


"Additional Note for E2000 E3000 and E4200 etc. users:
Do the initial flash with the trailed build that contains your router model number...(example...xxx_e2000.bin for a E2000 model) Once you have done the initial flash...you can upgrade firmware using the build that contains xxx_e2k_e3k.bin for all subsequent flashes. (If you are using a 16758 or higher build, which is newer than is recommended, you must use a nv60k build rather than the e2k-e3k build - See the wiki for your router and this post: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=148350)

Builds with nv60k in the name can only be used with routers that have a 60k nvram space. Builds with nv64k in the name can only be used on routers that have a 64k nvram space. If you use one of these builds and your router doesn't support it, you will brick your router and will need a serial cable to fix it. If you don't use one of these builds and your router needs it, you will brick your router and will need a serial cable to fix it. These nv60k/nv64k are only being used in very new routers, and the need to use these builds, if it applies to your router SHOULD be explained in the wiki for your router. No k24 supported routers use nv60/nv64. "

Perhaps my understanding of English is too poor to understand what Peacock writes in his Guide Embarassed

Last but not least, I want to thank you for your time trying to help me Smile

/Rene
ShakyUser
DD-WRT User


Joined: 18 Jun 2011
Posts: 71

PostPosted: Tue May 22, 2012 12:28    Post subject: Reply with quote
Have you succeeded in establishing a SSH connection via putty?

If so try this:
Quote:
WOL through Telnet/SSH

Note: This is the preferred method to send WOL magic packets remotely.

If you have local or remote Telnet/SSH access to your router, you can wake up a machine on the LAN by using the following command:

/usr/sbin/wol -i 192.168.1.255 -p PP AA:BB:CC:DD:EE:FF

Note that the full path to "/usr/sbin/wol" is important. Simply "wol" will not work.

Substitute AA:BB:CC:DD:EE:FF with the actual MAC address of the computer which you wish to boot remotely. Likewise, replace 192.168.1.255 with the actual broadcast address of the network (192.168.1.255 is the broadcast address when the machine has an IP of 192.168.1.x and subnet mask of 255.255.255.0). Replace "PP" with the port number your machine listens on (usually 7 or 9).


Source: http://www.dd-wrt.com/wiki/index.php/WOL
James2k
DD-WRT User


Joined: 23 Oct 2011
Posts: 394

PostPosted: Tue May 22, 2012 13:13    Post subject: Reply with quote
My apologies, you are correct your router requires a special build like you said. Though you still have some choice regarding builds, I would still say try another build, I am unfamiliar with your router, but if you fancy it you might want to check out what other E4200 users are running on their routers. Some other users might be able to chime in with their recommended builds for the E4200.

You can execute a WOL command via SSH like ShakyUser has posted, this should work and you do have alternatives if the WOL from WAN doesn't work out for you.

The SSH WOL method is a secure alternative to port-forwarding a specific address usable by anyone on the outside, of course you require your domain name/IP and MAC Address of the client to wake up, but with SSH you have the protection of either password or public key as well as being able to access it from the outside.

_________________
James



Routers:
Asus RT-N66U - K3.x v24-sp2 (12/17/13) big 23194 (BrainSlayer) - Main Router
WNR3500L - K26 v24-sp2 (08/19/13) kongmod 22200M (Kong) - OTRW2 Test Unit
Belkin F5D7230-4 - K24 v24-sp2 (12/24/09) micro-plus-ssh 13491M (Eko) - Access Point
2x WNR2000v3 DD-WRT v24-sp2 (03/08/12) std 18777 (BrainSlayer) - Repeater Bridge
rslarsen
DD-WRT Novice


Joined: 23 Dec 2011
Posts: 7

PostPosted: Tue May 22, 2012 15:28    Post subject: Reply with quote
Hi SharkyUser, James2k.

I Will be back tomorrow, after I have been looking at your solutions.
Meanwhile I will look around DD-WRT forums to see if others have a better/stable build for E4200.

/Rene
rslarsen
DD-WRT Novice


Joined: 23 Dec 2011
Posts: 7

PostPosted: Wed May 23, 2012 15:24    Post subject: Reply with quote
Hi again

I have now flashed an older build 18000. As far as I can read in some threads this Build should be more stable or the best stable build.

But but, I don't know how to get my computer to wake up from Internet using my iPad 3G, have tried some App's even Internet sites, without lock.

Perhaps I forgor to write in the beginning, that I don't have a static IP. I use DynDNS, and WOL should also work this way.

What would the start up script be when I use DynDNS???

I can see in router settings my computer has something called Net Broadcast with an IP 192.168.1.255 refer to my local pc IP 192.168.1.129

Last ?... What do I have to write in portforward?

/Rene
ShakyUser
DD-WRT User


Joined: 18 Jun 2011
Posts: 71

PostPosted: Thu May 24, 2012 5:49    Post subject: Reply with quote
It sounds like you are getting a little confused, Rene. Take a step back and think about what you want to achieve. It seems you want to be able to do WOL including from outside yourt local network.

As mentioned above I believe issuing the WOL command via an SSH connection to your router is the best option, in which case you can forget about port forwarding and scrap those rules.

1. You need to get SSH set up. Go to the Services tab and look for secure shell. Enable SSHd and set the port number.

Then I would look at the puttygen option to generate a strongly encrypted password key that is stored in a file used to gain access to your router.

Now go to Administration and enable SSH Management under Remote Access.

See this for lots more info:
http://www.dd-wrt.com/wiki/index.php/SSH

2. That’s it!

Assuming your SSH connection works you can now access your router via putty and issue the WOL command above. From the LAN you would dial 192.168.1.1:22 into Putty assuming you went with the default SSH port, whereas from the internet you would have something like rene.dyndns.com:22 (configure dyndns from Setup-->DDNS).
rslarsen
DD-WRT Novice


Joined: 23 Dec 2011
Posts: 7

PostPosted: Fri May 25, 2012 5:34    Post subject: Reply with quote
Hi ShakyUser

I have done exactly what you said me to do. SSH works and I maked a SSH key.

It works now. Thank you very very much. you deserve a lot of beer Very Happy


/Rene
ShakyUser
DD-WRT User


Joined: 18 Jun 2011
Posts: 71

PostPosted: Fri May 25, 2012 6:25    Post subject: Reply with quote
Hmmmm. Does the SSH connection definitely work? For example do you get some output of you type “netstat”?

If so I am not sure where this is going wrong. Do you still have the port forward rule configured? If so that could conceivably be screwing something up and you should try to disable it.

Otherwise I don’t know what to suggest, expect maybe only resetting dd-wrt and trying again. This should work!
ShakyUser
DD-WRT User


Joined: 18 Jun 2011
Posts: 71

PostPosted: Fri May 25, 2012 6:44    Post subject: Reply with quote
Ok, see you got it working after all and edited your original post.

Glad to hear that -- make mine a guld tuborg Razz
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware 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