andsln.com

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

  1. Make sure the PC has a static IP address.

  2. Go into Administration and Enable JFFS custom scripts and configs

Enable JFFS custom scripts and configs

  1. SSH into the router and create the script that will run every time the router boots up.
nano /jffs/scripts/services-start
  1. 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:

\/jffs\/scripts\/services-start

  1. Make the script executable.
chmod a+rx /jffs/scripts/services-start
  1. Forward port 9 to the IP address of your PC

Port Forwarding

  1. Reboot the router and wait for it to fully boot up (remember we set a 10 second pause)

  2. 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.

arp output

Reply to this post by email ↪