Wake On LAN question

General support questions
Post Reply
lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Wake On LAN question

Post by lightman47 » 2017/06/17 03:25:05

Is there some trick that could be used to send WOL/ether-wake magic packets across the Internet and routers to hit a machine on a local network? I already know the MAC, and will know the external IP.

I have an old, spare CentOS 7 (up to date) machine that I am thinking of giving to my sister some 60 miles away for use as a backup server for her laptop. Of course, she won't want it left running. Also despite she's running Windows, I am sure I can get it all running with scheduled WOLs, backup, and shutdown - providing I can get the packet through all those devices. My concern is that I will need to get to it from time to time for maintenance. Obviously then, I'll need to be able to wake it up.

If it's possible if the external IP is known that might work as we'll be giving her one of our dynamic domain names and could then ping it to derive the IP. I am thinking I could forward all port 255's from outside to this machine through her modem and then router.

... or is this all just a foolish dream?

Thank you.
jje

[edit/avij: Changed the subject from "General question" to a more descriptive "Wake On LAN question"]

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Wake On LAN question

Post by hunter86_bg » 2017/06/17 12:59:49

You just need remote access to a machine in the same lan segment.In my case -I was using an openwrt router.

Another option is to schedule 'wakeup'-s via RTC.You can use rtcwake for that.

jimj
Posts: 93
Joined: 2014/10/01 05:34:57

Re: Wake On LAN question

Post by jimj » 2019/02/13 04:22:22

I do what you're asking about. My old brief high level notes on this:
  1. Use a WOL web page or a fat client to send the magic packet
  2. Set your Internet firewall to forward an arbitrary port to your local network's broadcast address. I chose port 9 since most Internet WOL clients are hard coded to port 9, but it seems that most fat clients default to 7.
  3. Send the magic packet to dynamic DNS hostname (or public IP address) on UDP port 9 (choose /32 or 255.255.255.255 for the mask if your client requires a mask)
  4. So far I've verified this works with the Belkin Wireless G router, D-Link 624, D-Link 4300 and DD-WRT.

Even if you don't use DD-WRT this page has lots of good info:
https://wiki.dd-wrt.com/wiki/index.php/WOL

My DD-WRT config:

Code: Select all

[NAT/QoS->Port Forwarding]
APP	PORTFROM PROTO	IPADDRESS	PORTTO	ENABLE	
wol	9	UDP	10.16.1.254	9	x
//Note that 10.16.1.254 should never be used by any device.  Its sole purpose is to forward WOL broadcast packets.

[Administration->Commands]
Enable WOL by adding this command (from http://www.dd-wrt.com/wiki/index.php/WOL) into
the Web Interface Administration -> Commands section and then click the "Save Startup" button
(your must either reboot or click "Run Commands" to activate this command).
arp -i br0 -s 10.16.1.254 FF:FF:FF:FF:FF:FF

Post Reply