1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tomato WOL question

Discussion in 'Tomato Firmware' started by Cletus, Aug 23, 2009.

  1. Cletus

    Cletus Addicted to LI Member

    I use the Tomato WOL page to wake my computers and it works great. I have never been successful using third-party WOL tools to wake my computers through my router.

    Is there a way I can use something like wget or plink and a port forward to wake my PC's? Or a script or custom command I can add to Tomato? I'd also be interested in third party tools but please provide step-by-step examples of how to make it work. Thanks a lot
     
  2. baldrickturnip

    baldrickturnip LI Guru Member

    only some routers seem to work with the magic packet

    I just run the openVPN server on the 54GL , connect to it remotely, log into the router admin , issue the WoL packet, then I can see when it is up on the device list and then VNC to it.
     
  3. Cletus

    Cletus Addicted to LI Member

    That's what I do now: I login to Tomato, go to the WOL page, and click the computer to wake it. I'm looking for an automated way of doing it from outside the router. The router is a 54GL. Thanks
     
  4. Engineer

    Engineer Network Guru Member

    Edit: I may have misread the question in thinking that you wanted to wake the PC from the WAN side, not using a utility on the LAN side. The below works on WAN, but I'm not sure about the LAN side.

    From previous work that I had at another forum (http://forums.anandtech.com/message...ORDFRM=&STARTPAGE=4&FTVAR_FORUMVIEWTMP=Linear ). The need to add the an unused IP in the ARP tables and then forward any port to that unused address to get it to work. Once the magic packet is received, it will broadcast across the LAN side of the network.

    Add the following to your "init" script and save.

    sleep 5
    ip neigh change 192.168.0.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0
    ip neigh add 192.168.0.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0

    The IP (listed) can be any IP in your subnet that you are not going to use (i.e. don't use 192.168.0.254 for any PC in the network).

    Now forward ANY UPD port that you like (9 for example) to the same IP listed (192.168.0.254 in the example). Save the forward.

    Note: You can also disable any previous forwarded ports that were enabled for all WOL experiments of this thread, lol.

    Reboot router.

    Go to link for sending magic packet. Send magic packet to IP address (from ISP), port used above, MAC of the PC you want to wake up as well as a subnet mask of 255.255.255.255. PC should wake up. You can now wake up ANY pc on your LAN in the same subnet simply by using the forwarded port and MAC address. You no longer need static IP's, static DHCP, or individual forwarded ports. The above commands allow your forwarded port to be "broadcast" to the entire lan. Pretty damn cool, eh?
     
  5. Cletus

    Cletus Addicted to LI Member

    In your example, should I use 192.168.0.254 even though my dhcp address range is 192.168.1.100 - 192.168.1.255? In other words, shouldn't I use 192.168.1.254?
     
  6. Engineer

    Engineer Network Guru Member

    Yes, that's correct (you should use 192.168.1.254 and set your range to only go no higher than 192.168.1.253 on DHCP). The example that I gave was for 192.168.0.xxx range.
     
  7. Cletus

    Cletus Addicted to LI Member

    I entered

    sleep 5
    ip neigh change 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0
    ip neigh add 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0

    in Init and rebooted. No dice waking the machines. What should I put in port forwarding and what should I put in the wol packet? Thanks
     
  8. Engineer

    Engineer Network Guru Member



    Any port that you wish. If you want to use port 1234, feel free. Use the same port that you forward in the magic packet. Remember to use the "real MAC address" of the PC to wake in the magic packet.

    By the way, are you trying to wake from the WAN or LAN? I'm not sure how this works on the LAN (yet)?
     
  9. ratchet

    ratchet Addicted to LI Member

    Well, I can confirm that this works beautifully over the internet. Thanks to Engineer, who did indeed "crack" this on the other forum, numerous times since winter I've booted and shutdown my desktop in PA from Boston, where I have children, and while on vacation from other locations.
     
  10. Engineer

    Engineer Network Guru Member

    Thanks, but can't take credit for it all. I simply read around the net enough to gather the information and put it in once place. I did read enough to understand what it does (or did at the time I wrote it, lol). Glad it works! :)
     
  11. ratchet

    ratchet Addicted to LI Member

    Na! Not letting you off the hook that easy. Because of the fact that the WRT54GS, and most other routers, will not allow forwarding to a broadcast address and the ARP release issue, I'd searched and tried all kinds of hacks for probably a year without success. So you are my hero for life!
     

Share This Page