What's new

Solved WOL - Wake on Lan over the Internet - magic packet RT-AC68U 386.4

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

Nesalex

Regular Contributor
Hi

I need an advice. I was recently looking for a way to run a NAS over WOL based on a port connection request:

https://www.snbforums.com/threads/wol-with-request-from-internet-rt-ac68u.76595/#post-736425 - Big thanks to eibgrad for creating a working script ...

This time I try to send a magic packet via the WakeOnLan application from DEPICUS.Everything works in the local network. Also an android application and also a program on a PC. I have a problem with waking up over the internet. I found a thread where it is solved but it's older:


There is information on the depicus page about possible blocking of packets for waking up, but I did not find it in the router :


And here it is written about arp but I don't understand it :( :


Can anyone advise me what I could try? well thank you
 
Have you forwarded the port to the local IP address ? and what is it that you do not understand about ARP ?
 
I can't find the original config I had for this but simply forwarding to an IP won't work as the host isn't awake to own it.

Last time I did this, I reserved an IP address to forward all packets received on port 9 to and then had an additional arp command added as part of router start up that took anything considered for that IP and turned it to a local broadcast.

I'll come back with the config if I can find it.

Edit: Its for DD-WRT but the basic command arp or ip neigh commands used are at https://wiki.dd-wrt.com/wiki/index.php/WOL#Remote_Wake_On_LAN_via_Port_Forwarding.

One word of warning from another RMerlin post though - apparently some NICs/Mobos are reported to not be too picky over the MAC address the magic packet contains so start to randomly wake up when WOL is exposed to the internet. Not something I've seen personally but just in case you get some odd behaviours.
 
Last edited:
I can't find the original config I had for this but simply forwarding to an IP won't work as the host isn't awake to own it.

Last time I did this, I reserved an IP address to forward all packets received on port 9 to and then had an additional arp command added as part of router start up that took anything considered for that IP and turned it to a local broadcast.

I'll come back with the config if I can find it.

Edit: Its for DD-WRT but the basic command arp or ip neigh commands used are at https://wiki.dd-wrt.com/wiki/index.php/WOL#Remote_Wake_On_LAN_via_Port_Forwarding.

One word of warning from another RMerlin post though - apparently some NICs/Mobos are reported to not be too picky over the MAC address the magic packet contains so start to randomly wake up when WOL is exposed to the internet. Not something I've seen personally but just in case you get some odd behaviours.
thx for respond..

In this :

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.
  • Explanation/rationale for this setup: Normally, WOL magic packets are sent to a special broadcast IP--to the final .255 in a subnet or to 255.255.255.255. Since port-forwarding to these special dedicated broadcast IPs does not work, what we need to do is create our own broadcast IP by taking an unused IP and assigning it a broadcast MAC and then port-forward to that.
  • As an optional alternative, instead of arp, you can use ip neigh (which does the exact same thing as arp). Support for ip neigh was removed from DD-WRT starting with build 17650, and arp is unavailable in DD-WRT builds older than 5672.
ip neigh change 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0
ip neigh add 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0


In RT-AC68U i dont have Commands section.. I didn't find the command section anywhere in the menu. Do you think it could work via putty - SSH?
For arp -i br0 -s 192.168.1.254 FF:FF:FF:FF:FF:FF or ip neigh change 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0

Port forward is active on UDP/ 9/ 192.168.1.254
 
Couple of stupid questions first.... Subnet the router is configured for as DHCP is 192.168.1.x and the DHCP pool is limited to not hand out 192.168.1.254 - correct? If you're using a different IP range for your LAN then update the IP accordingly.

If that's the case and the port forward is in place you should be able to run the arp command logged in via ssh and then test. Note that this will need to be re-done after a reboot so a start-up script to wrap it.
 
Couple of stupid questions first.... Subnet the router is configured for as DHCP is 192.168.1.x and the DHCP pool is limited to not hand out 192.168.1.254 - correct? If you're using a different IP range for your LAN then update the IP accordingly.

If that's the case and the port forward is in place you should be able to run the arp command logged in via ssh and then test. Note that this will need to be re-done after a reboot so a start-up script to wrap it.
The DHCP range is 192.168.1.2 to 192.168.1.254

Sorry I don't quite understand this sentence - Note that this will need to be re-done after a reboot so a start-up script to wrap it.

I'm a layman inexperienced and I don't understand some obvious things...

Now I will try to use the command arp -i br0 -s 192.168.1.254 FF:FF:FF:FF:FF:FF or this if the previous one will not work ip neigh change 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0
 
The DHCP range is 192.168.1.2 to 192.168.1.254

Sorry I don't quite understand this sentence - Note that this will need to be re-done after a reboot so a start-up script to wrap it.

I'm a layman inexperienced and I don't understand some obvious things...

Now I will try to use the command arp -i br0 -s 192.168.1.254 FF:FF:FF:FF:FF:FF or this if the previous one will not work ip neigh change 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0
OK, reduce the DHCP range so it only goes up to 192.168.1.253 - you don't want the router allocating out the .254 address otherwise it will start broadcasting all traffic destined for that machine to the whole network.

The arp command should do the job - it won't make a permanent change to the configuration though and will be lost whenever the router reboots. Others will be better placed than me to suggest the best point to add the line in to make sure it kicks in on start up - the last time I did this I was able to use the web UI to add the line (which doesn't look like an option now) but can't remember if I was on ASUS/Merlin firmware at the time or not.
 
After enter. Can I check if this has been applied? Or I will use ip neigh change 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0 ?
 

Attachments

  • ARP.jpg
    ARP.jpg
    43.9 KB · Views: 151
ouuuuuuu. It works. Big thanks. As you write, just need to make it work even after the restart :)

someone some solution?
 
EDIT: Forgot to mention, this is for Merlin users.

You will need to enable scripts and then make a /jffs/scripts/services-start script.

You may have to put the arp commands in the /jffs/scripts/firewall-start script if you find that the arp table is flushed on a firewall restart. You will have to experiment with this one;

 
EDIT: Forgot to mention, this is for Merlin users.

You will need to enable scripts and then make a /jffs/scripts/services-start script.

You may have to put the arp commands in the /jffs/scripts/firewall-start script if you find that the arp table is flushed on a firewall restart. You will have to experiment with this one;

uff:) ... I can experiment just in bed only :). In the first link of this thread I put a link where eibgrad created the script and I knew how to do everything automatically. If someone wrote a similar script .... :rolleyes:
 
Many thanks to EIBGRAD for resolving my request.

In the original script: http://www.snbforums.com/threads/wol-with-request-from-internet-rt-ac68u.76595/post-735310

Need to add arp -i br0 -s 192.168.1.254 FF:FF:FF:FF:FF:FF

Right behind this command:

# wait for *reliable* internet connection
until ping -qc1 -W3 8.8.8.8 &>/dev/null; do sleep 10; done


Now it works wonderfully. Launch the device from the Internet via WOL based on a request for access via a specified port or by sending a magic packet using one of the WOL services. Excellent. Big thanks...
 

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!

Staff online

Top