Wake on Lan Problem

Hi, I have a tricky problem trying to wake up my computer.

  1. I have a static IP-MAC in DHCP lease and ARP cache.
  2. I have this entry in my firewall: add action=dst-nat chain=dstnat disabled=no dst-port=9 protocol=udp to-addresses= 192.168.1.10 to-ports=9

When I use my android device to wake up my computer over wifi, it doesn’t work. But when I use my android device trough my VPN to my mikrotik router over 3G It’s woke up my computer.

I don’t know why It’s doesn’t work over wifi

Thanks

Al

When using wifi, you’d have to use the computer’s MAC in the WOL packet, not the IP. (Or add the computers mac as a static arp entry to the android).

If you use the IP in your WOL packet when on wifi, your android will do an arp broadcast asking who has 192.168.1.10. The computer won’t reply because it’s off. The Mikrotik won’t reply despite knowing because that’s not how ARP lookups work. Only the device with the MAC would reply. The IP stack is part of the OS, so if the computer is powered off, the computer technically doesn’t have an IP.

When using a tunnel VPN over 3G, then your android doesn’t do an ARP lookup, rather it forwards the WOL packet to the VPN server and the VPN Server (being the Mikrotik) will do the arp lookup. But of course it doesn’t have to because it already knows the MAC address.

When using a tunnel VPN, I don’t think you can use a WOL packet specifying the MAC address since a tunnel VPN requires IPs to route.

If you plan to always use a VPN from Android to your Mikrotik, then you don’t need the firewall dst-nat rule.

Another note, if your Android knows your computer’s mac just before you shut the computer down, the WOL packet with IP may work over IP until the arp cache on the android expires, usually just a few minutes or maybe when the device goes into standby mode.

A lot of thanks, now, I understand much more how ARP works