What's new

Wake on WAN partially working

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

OXYG3N

New Around Here
Hi,
I'm trying to set up "Wake on WAN" on my local dekstop PC.
I've enabled the related settings both in the BIOS and in the ethernet network adapter's advanced settings, and the system works when I send the "magic packets" from a PC inside the network (wake on LAN).
However, when I try to send the wake-up packets from outside the network, it only works for a while (~5 min) after the local PC has been shut-off.

The PC to be woken up has a static IP assigned by the router through DHCP reservation, the packets are sent to the PC though a ddns.net (dynamic DNS) address, and the local UDP port 9 (used for WOL) had been forwarded to the static IP of the local PC.
I've disabled all the power-saving settings in the Windows power plan, the network adapter's settings, and in the BIOS.
Using Wireshark I've also verified that the packets are being routed to the destination port, both when they're sent from inside the network and from outside.

Any idea why this is happening, and how I could get wake on WAN to work?

Thanks in andvance
 
For wake-on-wan to work the router needs to already know the MAC address of the target. It is not sufficient to just reserve an IP address for it in your DHCP server. It sounds likely that after your PC is shut off its MAC address shortly expires from the router's MAC address table. To avoid this you should create a static ARP cache entry that associates the MAC address with the IP. Then, when your UDP packet arrives at the router it knows where to send it.
 
For wake-on-wan to work the router needs to already know the MAC address of the target. It is not sufficient to just reserve an IP address for it in your DHCP server. It sounds likely that after your PC is shut off its MAC address shortly expires from the router's MAC address table. To avoid this you should create a static ARP cache entry that associates the MAC address with the IP. Then, when your UDP packet arrives at the router it knows where to send it.
That might also explain why wake-on-WAN doesn't work even when the target PC has been in Sleep state for a while (~ 5min)?
Because I also just tested that it seems to behave the same as when the target PC is shut-off.

If I changed the port forwarding setting for UDP port 9 to a broadcast address (instead of the target PC's static IP), would that also solve the issue?
I'm not very practical about this, could you please explain how I can create a static ARP cache entry?

Sorry for asking so many questions, hope I'm not bothering you too much
 
If I changed the port forwarding setting for UDP port 9 to a broadcast address (instead of the target PC's static IP), would that also solve the issue?
You could try that, but you might find that your router doesn't allow you to enter a broadcast address. Try it.

I'm not very practical about this, could you please explain how I can create a static ARP cache entry?
What router do you have?
 
You could try that, but you might find that your router doesn't allow you to enter a broadcast address. Try it.
My router is indeed allowing me to forward UDP port 9 to a broadcast address (192.168.1.255, since the static IP of the target PC is 192.168.1.3), but when sending "magic packets" from outside the network, it seems they're not being forwarded anywhere on the network (by looking at Wireshark).
I can only see the packets getting through when I send them from outside the network and UDP port 9 is forwarded to the static IP of the target PC (btw, I'm checking this using Wireshark on the target PC, maybe this test isn't valid since I want to see if the packets get routed to the target PC even when it's off?).

What router do you have?
I'm using my ISP-provided router, a Vodafone SHG3000 (OpenWrt product page).
 
My router is indeed allowing me to forward UDP port 9 to a broadcast address (192.168.1.255, since the static IP of the target PC is 192.168.1.3), but when sending "magic packets" from outside the network, it seems they're not being forwarded anywhere on the network (by looking at Wireshark).
I've just tried the same thing on my router and it also didn't work. I'm not really surprised as port forwarding only normally works for unicast packets.

I can only see the packets getting through when I send them from outside the network and UDP port 9 is forwarded to the static IP of the target PC (btw, I'm checking this using Wireshark on the target PC, maybe this test isn't valid since I want to see if the packets get routed to the target PC even when it's off?).

I'm using my ISP-provided router, a Vodafone SHG3000 (OpenWrt product page).
I'm not familiar with that device but it doesn't sound like you could create custom changes to its ARP table to solve the timeout problem anyway?

It looks like you need to find an alternative solution. Does your router (or a server on your LAN) run a VPN server? If so you could connect to that and issue the WoL. How about the router itself, some routers have a built-in WoL GUI option.
 
I'm not familiar with that device but it doesn't sound like you could create custom changes to its ARP table to solve the timeout problem anyway?
I don't think so, I'm running the default firmware on this router, and I don't know of any custom version of it that could allow to do that.

It looks like you need to find an alternative solution. Does your router (or a server on your LAN) run a VPN server? If so you could connect to that and issue the WoL. How about the router itself, some routers have a built-in WoL GUI option.
Unfortunately there's no built-in WOL option in the router settings, but it does have support for VPN (screenshot below), I'm just not sure how to set it all up, and if there would be implications for the other devices on the network...
 

Attachments

  • vpn settings.png
    vpn settings.png
    86.6 KB · Views: 19
Unfortunately there's no built-in WOL option in the router settings, but it does have support for VPN (screenshot below), I'm just not sure how to set it all up, and if there would be implications for the other devices on the network...
PPTP is insecure and shouldn't be used. L2TP by itself doesn't encrypt the data so it's usually used together with IPSec. That said, I have no idea how you would go about setting up IPSec on your router and client device.

Do you have any other always-on PCs/servers on your LAN that might be useful?
 
Do you have any other always-on PCs/servers on your LAN that might be useful?
No. I'm now considering these two alternatives:
- setting up an automatic "wake up" task in the Task Scheduler
- buying a smart plug to remotely control power to the target PC, and enable the "restore on AC Power Loss" option in the BIOS (even though this would require cutting the power to the PC, which I'd prefer to avoid)
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top