Wake-on-wan (good enough, but could be better)

Stock Zyxel firmware has a wake-on-wan feature if I recall correctly. I don't recall how that setup worked but here's how to achieve similar functionality via openwrt.

! It does feel 'hacky' and not super clean either (all udp on port 9 gets mapped to the broadcast)
but until i find a better solution this will have to do.

under network>firewall>port forwards add a redirect rule
upd port 9 form wan to a 'will-never-be-used' local ip address, e.g. 10.0.0.253
then, from the CLI map this addr to the broadcast mac addr,
 ip neigh add 10.0.0.253 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br-lan
You're done! ... but not quite.
there are some pitfalls.


  1. the arp table can get flushed, e.g. interface changes, or reboot. You can add this line to rc.local, or as an init.d script or i supposes a procd script... but no info on what is best, hopefully more soon.
  2. the magic incantation above can fail of the ip is already known. I haven't found a clean way to flush an addr from the arp table so if you tested the forward rule it will show up in the arp table - but you wont't be able to set it to the broadcast. 
Error: either "to" is duplicate, or "lladr" is a garbage.
  I first tried with ...254, which still shows up in my arp table ...
10.0.0.254 0x1 0x0 00:00:00:00:00:00 * br-lan

all in all, not too happy with this situation... there ought to be a better way.

Comments

Post a Comment

Popular posts from this blog

Traffic accounting

QoS with SQM (and something about bufferbloat)

Ath10k alternative driver firmware - CC15.05.1 wireless unstable