What's new

[help] WOL Script Wake Up Your Webserver

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

You'd have to use whatever logging facilities are available on the sending or receiving machines. Alternatively you could "sniff" the LAN traffic using something like Wireshark.
Well, the receiving machine will be asleep (hence trying to intercept any traffic heading to it and send a magic packet). The sending machine is a not so smart smart TV running WebOS so not much I can do on that end either. All I'm trying to do is exact same thing as OP but for LAN-LAN traffic.

Surely, since all traffic (LAN or otherwise) must pass through the router to get to the Plex server, there should be some way to intercept it on the router? If only LAN-WAN and WAN-LAN can be intercepted I suppose I could tell the Plex client to try to access an IP outside of the LAN (which will be routed) and if that fails (which it will because the IP is made up), try again with the local Plex server IP. If I tell the router to send a magic packet to the Plex server IP whenever it routs traffic to the bogus IP outside of the LAN then theoretically it would work I suppose but that's just very messy.

I'd really like to avoid adding another device into the mix if at all possible.

Just as a side note, this was all actually working fine without any scripts whatsoever on the crappy Technicolor router I was using previously. I had to set up my Plex machine to accept any packets, not just magic packets, but the router sent them through. This ASUS AC1900P simply won't send traffic to the machine if it is asleep. Could all this be solved if I added a static ARP table entry for the Plex machine (grasping at straws here!).
 
Surely, since all traffic (LAN or otherwise) must pass through the router to get to the Plex server.
As John said, LAN to LAN traffic doesn't go through the router because it is switched (the traffic stays on the switch chip) not routed, hence it cannot be intercepted by iptables. So a script that is based on iptables syslog messages won't work.
 
Just as a side note, this was all actually working fine without any scripts whatsoever on the crappy Technicolor router I was using previously. I had to set up my Plex machine to accept any packets, not just magic packets, but the router sent them through. This ASUS AC1900P simply won't send traffic to the machine if it is asleep. Could all this be solved if I added a static ARP table entry for the Plex machine (grasping at straws here!).
I think you may have hit the nail on the head there. I seem to recall numerous posts from people that had to create static ARP entries related to WOL, because the dynamic entry would expire after a period of time.

https://www.snbforums.com/threads/help-setting-static-arp.39823/#post-332625
https://www.snbforums.com/threads/help-setting-static-arp.39823/#post-332634
 
I think you may have hit the nail on the head there. I seem to recall numerous posts from people that had to create static ARP entries related to WOL, because the dynamic entry would expire after a period of time.

https://www.snbforums.com/threads/help-setting-static-arp.39823/#post-332625
https://www.snbforums.com/threads/help-setting-static-arp.39823/#post-332634
Thanks Colin. I kinda figured the router would be setting a static ARP entry anyway, because I've assigned an IP to the MAC address manually in the UI which I assumed would have the same outcome. My introductory networking classes from uni are failing me.

EDIT: Re-read your post about the traffic never leaving the switch chip. I assume this means the router has no way of interfacing with this chip in any scriptable manner so thanks for clarifying that.

EDIT2: Occurred to me that as soon as the Plex server is put to sleep it isn't accessible. Ie, if you put it to sleep and then ping it straight away it won't wake up. If this were an ARP entry problem it sounds like the ping should have woken it (remembering it can wake on any traffic, not just magic packet). I'll still have a look into it though because I've exhausted my options at this point.
 
Last edited:
Assigning an IP address to a MAC address only effects DHCP (it creates a reserved IP). It has no bearing on the ARP table which is populated by the broadcast traffic on the LAN.

No you can't script it because the router never "sees" the traffic. (Strictly speaking, anything is possible :rolleyes:. The switch chip can be reconfigured at a low level to logically disconnect the physical LAN ports from the internal bridge and route it through the router. But it's a lot of work and I wouldn't recommend it.)
 
Still no dice on any of this. Static ARP entry didn't seem to change anything. I suppose I can either try that bogus WAN IP idea or try to ensure that when I access Plex I do it through Plex's web servers so that it has to go through WAN. Not super keen on requiring internet access just to wake something up on the LAN but it is what it is I guess.
 

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