Wake on LAN doesn't work over public network, but will on local

1

1

I have a problem. I am trying to make a WoL script, which will turn on my PC. I'm not interested in going into details about that project.

I have an app on my phone, which allows me to enter the MAC address and local IP, and then the PC will turn on. It works perfectly, but it won't over the Internet.

I have port forwarded port 7, 9, and 2304. I have entered the right IP, but it still won't work. My other port forwards work perfectly, so that is not the issue.

As said: It works on local, but not through the Internet. What could be wrong?

I have a Netgear wnr2000v3 for your information.

MortenMoulder

Posted 2013-11-11T18:54:31.943

Reputation: 173

Just seeking clarification here but are you sending the packet to your external IP:port which then should forward the packet to the right local IP? "which allows me to enter the MAC address and local IP" - you need to know the external IP and sounds like the internal one as well. – Enigma – 2013-11-11T18:58:52.907

I am simply typing in my public IP, then the port (which is 9 as default). Nothing else. I simply port forwarded and changed the local IP to the public IP. – MortenMoulder – 2013-11-11T19:00:31.427

I don't see how this could possibly work. How would your router put the packet on the wire without knowing the target machine's MAC address? What are you expecting the destination hardware address on the LAN packet to be and how are you expecting the router to know to put it there? – David Schwartz – 2013-11-11T19:05:14.713

I have no idea how this works. I don't know how and why it doesn't, and if I did then I would probably have fixed it myself. I know it's possible, the question is just how. – MortenMoulder – 2013-11-11T19:16:30.640

Answers

1

You need to put a static ARP mapping on your router so it never forgets the MAC address of the machine you're trying to wake.

The UDP/IP port mapping allows your router to know which local private IP address to forward the WoL magic packet to, but if the target machine has been asleep for more than 2 minutes or so, the router won't have its MAC address in the router's ARP cache anymore, so the router won't know which MAC address to put on the packet at the link-layer. Since the target machine is asleep, it probably is not responding to ARP requests, so there's no way for the router to learn the MAC address it needs to know to address the packet properly.

So you have to statically/permanently enter the target machine's MAC address into the router's ARP table.

If the factory firmware on your router doesn't let you add static/permanent entries to the ARP table, look into after-market (typically open source) firmware distributions that will let you. Or find a different router that gives you more control.

Spiff

Posted 2013-11-11T18:54:31.943

Reputation: 84 656

0

WOL won't work from the wider Internet as the Wider Internet does not carry MAC addresses. You might be able to get something on your router which will "proxy" or create a request.

davidgo

Posted 2013-11-11T18:54:31.943

Reputation: 49 152

http://wakeonlan.me/ and http://www.dslreports.com/wakeup can WoL through the Internet? :) – MortenMoulder – 2013-11-11T19:21:38.980

In his case, he already knows the MAC address of the machine he's trying to wake, so it's possible to make this work. – Spiff – 2013-11-11T19:24:27.830

I have a WoL Monitor, which allows me to see the packets being sent to my machine. If I run the app on my phone, then enter the MAC address and all that, it will show up on the monitor program. However, it won't work through the Internet. I already know the MAC address of my machine, so your comment made me wonder. – MortenMoulder – 2013-11-11T19:28:14.187