How to Wake-on-WAN every time. [Asus-Merlin]
Introduction
So I had set up WoL for a friend to turn on my PC and use it with Parsec while I’m not home, at first it worked by forwarding port 9 to the IP of my PC but after a while of the PC being off it would stop working. This guide will fix that given that you have an Asus router flashed with Merlin.
Guide
-
Make sure the PC has a static IP address.
-
Go into Administration and Enable JFFS custom scripts and configs
- SSH into the router and create the script that will run every time the router boots up.
nano /jffs/scripts/services-start
- Copy and edit the following code:
1#!/bin/sh
2
3# Wait for the router to finish booting up
4sleep 10
5
6# Set ARP for expected WOL behavior:
7/sbin/arp -s ip.of.your.PC xx:xx:xx:xx:xx:xx
It should look something like this:
- Make the script executable.
chmod a+rx /jffs/scripts/services-start
- Forward port 9 to the IP address of your PC
-
Reboot the router and wait for it to fully boot up (remember we set a 10 second pause)
-
SSH into the router again and run the following command:
arp
In the output you should see the IP and MAC address followed by “PERM”, meaning it won’t get cleared from cache.