Wake on Wan not working (18.06, Archer C7 v4)

Hey,
I'm trying to get Wake on WAN working on my Arhcer C7 (running OpenWrt 18.06).
So I saw a few guides which all basically say the same thing, you need 2 things:

  1. set a static arp from 192.168.1.254 to ff:ff:ff:ff:ff:ff
  2. port forward udp 9 (the port im using) to 192.168.1.254.

I installed tiny-ip and added the arp entry: https://i.imgur.com/bdcGOGp.jpg (even added ip neigh add 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br-lan to /etc/rc.local)
Configured the Firewall to forward port 8 to 192.168.1.254: https://i.imgur.com/tBhT45n.png
But still cant see the magic packet when trying to WOL from internet (Im using my phone).
Any ideas?

Thanks!

Your ISP and every other one between your phone and your WAN interface should be blocking non-routable traffic, such as what you're trying to send.

Wake on LAN, not wake the entire Internet

Hey,
Thanks, WOL from internet worked with my old router (literally 2 days ago) so I don't think its the ISP

Then please explain how you've been routing a Layer 2, link-local, Ethernet broadcast frame over the Internet

Im sending a UDP packet to my IP address on port 9, I expect the router to pick it up and broadcast it on my network (forward it to 192.168.1.254 which has a static arp entry to ff:ff:ff:ff:ff:ff)

Sounds like you and @daiaji should get together on this

Does OpenWrt reject any port forwarding to the broadcast address?

The key missing information was that you are not trying to send the Layer 2, Ethernet broadcast packet, which doesn't contain any IP addresses over the Internet, but are trying to poke your router from the Internet and have it send a WOL packet over your LAN.

What you're describing is pretty much of a hack, and has no meaningful security.

I'm guessing you've got some kind of app that generates a UDP packet addressed to your outside IP that contains the "magic packet" header and 16 repetitions of the target machines MAC address in its payload.

As just one way of doing it more robustly, ssh into the router and send the packet.

That you've got a well-known MAC address (broadcast) in your static ARP table may cause problems.

Past that, tcpdump to check that the packet is actually arriving at your WAN interface would be the first thing to check. Then check the LAN interface for the packet. Then either or both enable iptables logging and use conntrack tools.

yes that is correct, I can confirm this method works on OpenWRT Chaos Calmer 15.05.1 (kernel version 3.18.23) which my old router is using...
I'll check the tcpdump and will update. Thanks again!

I can confirm this is in fact a problem with the port forwarding, I changed the port forward to my PC's Internal IP (instead of 192.168.1.254) and I receive the packet.

"Forging" the arp table to try to send to the Ethernet broadcast address may have changed with the more recent kernels. It's difficult for me to argue that being able to forge the arp table in that way is not without security implications.

You might look at an application that is intended for sending WOL packets from the command line, or a "one-liner" that can accomplish that. It could be activated through ssh, or by a listener on your "special" port (though the latter provides no authentication).

You might want to look at, for example, the etherwake package (which also looks to have a LuCI interface, though I do not recommend exposing LuCI on the WAN side of your OpenWrt box, nor over any unencrypted channel).

While it used bash-specific functionality, one such sketch for such a one-liner (that would need to be modified to run under sh) can be found at

Hello! I have the same router and the same problem (Archer C7 v2 running OpenWrt 18.06.2). It is impossible to get Wake on WAN work!
HOWEVER, when I use factory firmware 3.15.3 Build 180308 Rel.37724n everything is work correctly!
I tried all ways described in Internet, and had no luck.
Did anybody find any way to make WOW work on OpenWrt 18.06.2?

What have you tried?

Are you trying to wake your OpenWrt device on magic packet or other devices? Where are you sending the magic packet from?

I want to wake up My Computer using magic packet from Internet. When I install factory firmware, I can Wake Up computer with no problem. But I have troubles with OpenWrt 18.06.2.
Firstly, I tried to follow similar steps - create arp entry (ip neigh) of My Computer and port forwarding for it.
Next try - create arp entry of free IP with broadcast MAC and port forwarding.
If I send magic packet in local network - in both cases I can wake up computer.
If I want to do it from internet - nothing happening.