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

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Wake On Lan Does not work

Discussion in 'Asuswrt-Merlin' started by Bijan, May 30, 2018.

  1. Bijan

    Bijan New Around Here

    Joined:
    May 30, 2018
    Messages:
    7
    I recently went from DD-WRT to Asus-WRT Merlin. I have been having some issues getting WoL to work properly.

    Here is what I have done so far.

    Administration > System > Enabled JFFS Custom Scripts/Configs
    Created /jffs/scripts/net-start script that runs `arp -i br0 -s 192.168.1.254 FF:FF:FF:FF:FF:FF`. Made script executable.

    WAN > Port Forwarding > Added entry with Port of 9 for Port Range and Local Port and put in 192.168.1.254 for Local IP.

    Downloaded Wake On LAN Monitor and turned on for Port 9 to alert me of Wake On LAN Packets.

    Network Tools > Wake on LAN > Attempted to wake up PCs MAC Address. Nothing happened.

    I SSH'd into Router and tried to run `ether-wake -b -i br0 F0:79:59:XX:XX:XX`

    Running `arp -a 192.168.1.11x` returns `Zebra (192.168.1.11x) at f0:79:59:xx:xx:xx [ether] on br0`

    I tried changing the IP of the Port forwarding to the actual PCs IP and it did not work either.

    Is there something I am doing wrong? My PC should already have the correct WOL settings since it was working with DD-WRT
     
  2. elorimer

    elorimer Very Senior Member

    Joined:
    Dec 16, 2013
    Messages:
    758
    This is the script I use to wake up a computer when a VPN connection is made:
    Code:
    #!/bin/sh
    logger "VPN client connected!"
    # MAC address of the device you want to wake up
    /usr/sbin/ether-wake -i br0 -b "xx:xx:xx:xx:xx:xx"
    exit 0
    
    Perhaps the quotes?
     
    Last edited: May 30, 2018
  3. Bijan

    Bijan New Around Here

    Joined:
    May 30, 2018
    Messages:
    7
    Nope, no difference. Am I supposed to do port forwarding for port 9 on 192.168.1.254 or the machines IP address? How does ether-wake know to send it via port 9? Could it be different port like 7? I was using port 9 before.
     
  4. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    8,548
    Location:
    UK
    Router model? Firmware version?

    Forget port forwarding for the moment, try getting WOL working on your LAN. If it doesn't work on the LAN it definitely won't work from the internet.
     
  5. Bijan

    Bijan New Around Here

    Joined:
    May 30, 2018
    Messages:
    7
    Whoops. v384.5 of AsusWrt-Merlin, RT-AC56R
     
  6. kfp

    kfp Very Senior Member

    Joined:
    Jun 26, 2014
    Messages:
    709
    Could you try that without the -b switch? That’s meant to send to the broadcast address, which is not what you’re trying to do.
     
  7. Bijan

    Bijan New Around Here

    Joined:
    May 30, 2018
    Messages:
    7
    Removed the flag and still get nothing.

    Here is my question.. I set my WoL Monitor program to run on UDP Port 9 (It's easier to first see if computer is receiving signal). When I run ether-wake, how does it know to send it to Port 9?
     
  8. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    30,384
    Location:
    Canada
  9. kfp

    kfp Very Senior Member

    Joined:
    Jun 26, 2014
    Messages:
    709
    It’s an unofficial ‘standard’ for WoL.
     
  10. elorimer

    elorimer Very Senior Member

    Joined:
    Dec 16, 2013
    Messages:
    758
    There's a page in the Wiki that might be helpful.

    Because the script I am using is triggered by a VPN connection, I've never needed port forwarding. Because the packet is coming from the router, rather than from somewhere else in the LAN or from the WAN, I don't see how port forwarding figures in this.

    To be clear, when you ssh in, are you running /usr/sbin/ether-wake, or just ether-wake?
     
  11. Bijan

    Bijan New Around Here

    Joined:
    May 30, 2018
    Messages:
    7
    Ah, changed the filename but even when I run command manually, WoL does not work.

    But i have seen port 7 be used to.

    i run just ether-wake but it shouldnt matter since /usr/sbin is part of the path.

    I got a utility called WakeMeOnLan that lets me test Magic Packet for WoL. To have it work, I had to use the machines IP as the broadcast address. In another program, I had to send WOL to the Broadcast IP (255.255.255.255). But I have still yet to have have the router send a signal to turn on the PC.

    It is fine if I do not get port forwarding to work. I can always make script to SSH into router and run command manually.
     
  12. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    8,548
    Location:
    UK
    Have you tried the WoL function in the router's GUI?

    Network Tools > Wake on LAN
     
  13. Bijan

    Bijan New Around Here

    Joined:
    May 30, 2018
    Messages:
    7
    Of course :) I just put MAC Address in and nothing happened
     
  14. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    8,548
    Location:
    UK
    Have you tried the Router's WoL with the PC actually in a sleep state rather than using your test utility (sorry for the obvious question but we have to cover the basics)?

    I'm assuming the PC is wired directly into the router and not wireless or going through some other equipment?
     
  15. elorimer

    elorimer Very Senior Member

    Joined:
    Dec 16, 2013
    Messages:
    758
    This always works for me.

    So, you added the MAC address, then applied it. Then clicked on the address and executed it, and nothing happened? Then this is on the pc side.
     
  16. Bijan

    Bijan New Around Here

    Joined:
    May 30, 2018
    Messages:
    7
    So im an idiot. Doing it from PC being off worked.