Is it possible to WOL over the internet via UnifiedRemote (VPN)?

3

1

I recently got a new app which supports Wake-On-Lan by MAC address in the network. My question is: Is it possible to turn on my computer using this when not in the network, but instead having a VPN to it?

If I have (for example) a Raspberry Pi in my network which acts as a VPN server, can I connect to it and then use Wake-On-Lan commands?

I plan using L2TP VPN.

Image for reference

Impulse The Fox

Posted 2017-09-05T12:42:14.497

Reputation: 939

Answers

1

Yes it is possible. In my case it works with "L2TP/IPSec PSK" on a Raspberry Pi connected to the local network.

Impulse The Fox

Posted 2017-09-05T12:42:14.497

Reputation: 939

2

WOL is a Layer-2 protocol, which means it will not work over the VPN itself (unless your VPN is a L2 bridge, which I doubt).

But what you can do is SSH into your RPi and issue the WOL command from the RPi itself, which should work (as the RPi is on the same L2 network as your target device)

Mark Henderson

Posted 2017-09-05T12:42:14.497

Reputation: 5 956

OpenVPN with TAP devices is a L2 VPN/bridge. Most of the time, TUN devices are used though, which is L3. – Sven – 2017-09-05T12:49:12.703

My plan is actually to do a L2TP VPN. Would that be possible? – Impulse The Fox – 2017-09-05T13:31:35.697

1

Yes, you can definitely connect like this, VPN or not. In fact, the RPi doesn't even need to enter the picture. The only requirements for the setup below is having the home router always on, and the router must be running DD-WRT or similar, so you can modify the ARP tables.

With only a little fussing around, and a good deal of testing to make sure everything worked, I have personally setup the following, and it has been working out well across multiple public, private, and VPN networks for several years now:

  1. Create a port forward rule on the Web Interface (Applications & Gaming -> Port Range Forward) to the chosen ip:

    wol  |  9  |  9  |  udp  |  192.168.1.254
    
    • Here, 9 is the default, but you can use any port number so long as your client wake-up application can talk to a port other than 9. Most WOL services will use either UDP port 7 or 9.
    • 192.168.1.254 is just an IP address in your LAN's subnet; it can be any IP, as long as it is not assigned to any device on your network.
  2. Add a static ARP entry by typing the following line into the Administration -> Commands section of the Web Interface and then saving with Save Startup.

    arp -i br0 -s 192.168.1.254 FF:FF:FF:FF:FF:FF
    
    • Do not change the FF:FF:FF:FF:FF:FF MAC address; this is a special MAC address used when broadcasting. WOL magic packets are constructed using the MAC address of the target computer, but should be and almost always are sent via broadcast; the MAC address used here controls with how the packet is sent, not how it is formed.
    • The 192.168.1.254 IP address should correspond with the IP address you used in the previous step. Again, this IP should be in your LAN's subnet, and you must not assign this IP address to any actual device on your network.

Source:

http://www.dd-wrt.com/wiki/index.php/WOL#Remote_Wake_On_LAN_via_Port_Forwarding

On your mobile phone, to signal your home router to wake up the computer on your LAN, you can use a service like Wake on Lan Over The Interweb by depicus. (You may be able to create your own personal web page using his code. I have not been able to do this yet -- his legacy code is all ASP.NET, and I am somewhat unfamiliar with hosting such stuff.)


None of this requires a VPN connection. However, as mentioned in the other answer, using SSH to get into the RPi, and then using WOL commands normally on your LAN may result in a more simple, though possibly less convenient, setup.

JonathanDavidArndt

Posted 2017-09-05T12:42:14.497

Reputation: 890