What's new

How to use VPN to Wake PC from WAN

  • 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!

Sousa

New Around Here
Hi All,

My first SNBForums post! Please be gentle.

I need help waking my PC from WAN. I've scanned these forums and Google'ed but not found an appropriate solution. The reason I want to do this is to be able to use my iphone to access my JRiver Media Library on my PC.

I do have wake on LAN working consistently. JRemote, JRiver's remote app, on my iPhone does wake the PC when on wifi.

This thread describes the static arp solution with forwarding of UDP port 9 but as Merlin warned:-
Don't. WOL over WAN is always a bad idea. Random scanning will constantly bring your computer out of sleep. Use a VPN tunnel instead. "
Additonally it was recommended not to rely on magic packets in general:-
Straight up (no vpn, ssh, gui) WOL from WAN was always unreliable for me. Some routers along the path just don't want to send those magic packets along. So sometimes it would work- sometimes not. ;) For me, VPN is the only reliable way (or logging into the router gui/ssh from WAN) I have found to WOL from WAN.

So I setup OpenVPN Server, on my ASUS RT-AC68U with Merlin 384.17, and used the config file to configure OpenVPN Connect on my iPhone. The VPN profile was 'successful'.



What I am at a total loss to is - How do I now use that VPN tunnel to wake the PC?

Thanks
Sousa
 
I'll try the simple path first as I've not done scripts yet.

On Network Tools|Wake on LAN I currently have my NIC's MAC address from "getmac /v". I use this assuming that it's the low powered NIC that needs to be signalled for wake, not the media server. (The media server is software, running on a PC).

I know how to make the VPN connection. ie. enabling the profile in OpenVPN Connect.



What I don't know is how on the iPhone to "Navigate to" the Network Tools|Wake on LAN page? Am I typing the external IP address into Safari?
 
FWIW, I've *never* had a problem w/ the WOL port forwarding method due to scanners, and I've been using it for YEARS. But then I don't use port 9 externally. I use something else, like port 31946. In fact, it's wise to *always* use a different external port than the well-known port for services, even the VPN. Most scanners are not going to bother looking for all services on all ports. It's just easier to scan the well-known ports for *expected* services, and if none found, move on to another IP, because the odds of finding something on the next IP are better.

That said, using a VPN is always better, for everything. I'm surprised these days just how many ppl still use classic port forwarding for nearly everything. That's a larger part of the reason for the epidemic when it comes to RDP hacking.
 
P.S. Don't overlook the use of smart, wifi-enabled AC plugs too. In many ways, these have made it possible to replace traditional WOL, and unlike WOL, will work w/ *both* wired and wireless devices. You configure your WOL targets to bootup from a loss of power (it's an option available in most BIOSes, usually in the power management section). Then plug your devices into the smart plug and use its app to locally/remotely power-up your devices.

FWIW, I picked up several (8) of the following ($5 a piece on sale) a few months ago,

https://www.amazon.com/gp/product/B07W443YZR/?tag=snbforums-20

Now you can WOL courtesy of Alexa! (lol)
 
Last edited:
P.S. Don't overlook the use of smart, wifi-enabled AC plugs too.
Also a good method. Particularly useful if you accidentally turn the PC off, instead of sleeping it. But a harsh way to turn a server off.

I got a three pack of round ones. I use them with one foot extenders off a UPS to several servers. I think better are the rectangular ones that only cover one plug.
 
I couldn't agree more
using a VPN is always better

I'll look into the wifi-enabled AC plugs whilst continuing on the VPN solution.





I did try testing with iPhone on wireless using http://your.internal.ip.address/Main_WOL_Content.asp and that works (as expected).

I'm thinking that I'll need to use my PC's external address as I can't see how the VPN will use the 192. address...

I'll try the following addresses in Safari (iPhone on 4G, VPN enabled):-
- http://your.internal.ip.address/Main_WOL_Content.asp
- your.internal.ip.address/Main_WOL_Content.asp
- http://your.external.ip.address/Main_WOL_Content.asp
- your.external.ip.address/Main_WOL_Content.asp
and report back.
 
All four failed with "Safari could not open the page because the server stopped responding". The PC remained asleep (same state where I can successfully awake it from hen on wireless. ie. Start > Sleep.

Maybe there is another setting on the router which I need to enable...

Under Advanced Settings > WAN I do have "Enable VPN + DHCP Connection" to "Yes" but rest of fields in Special Requirements from ISP section are blank or "No".

I've made no changes under Firewall.
 
Last edited:
My suggestion :
1. connect to your OpenVPN Server with your remote device
2. use putty to ssh to your router
3. at prompt level, issue the ether-wake command

if your PC does not start, it means you are missing something either in arp table or in the BIOS set-up of the PC or in the NIC card of PC ...

have been using this method almost everyday since 2 years with no issues.
 
I'm thinking that I'll need to use my PC's external address as I can't see how the VPN will use the 192. address...
On the VPN|VPN Server|Basic Configuration page, is "Client will use VPN to access" set to "Both" or "Lan only"?

When you connect to the VPN Server, the server gives the client a 10.16.0.xx address. That setting adds a route from that 10.16.0.xx address to your internal LAN. Your WAN address is irrelevant. I don't know what your WAN settings need to be for the router to have an internet connection but they don't figure into this. When I am connected to my VPN Server I can connect to http://your.internal.ip.address/Main_WOL_Content.asp.

If you are successful when connected to the internal LAN, then your PC and NIC settings should be ok.
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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