Automated WOL with OMV+Plex on Access
-
Hello,
I already asked that question in the german section, but I didnt get an answer there.
I am currently running the pfsense on a intel celeren g3900 + Asrock b150 with 4Gb ram and 2 Quad NICs.
Before that i used a Fritzbox, which had the option to send the magic package if the device was being accessed through port forward or from internal LAN.
I am using a OMV Server with Plex installed and goes to hibernation after 30 Minutes, because it takes only 1 or 2 Seconds to wake up and it consumes only 2 or 3 Watt instead of 30 or 40.
So when someone is trying to get Access to the Plex Library the Server should wake up and go to sleep when nobody is using it for 30 Minutes. Sometimes this could be several Days.
I want it to be in hibernation and not powered off, because the Raid5 is fully encrypted and it stays unlocked unitl power is down or it is shutdown completly.
What i tried so far, with the search function and with google is this Script.
https://forum.pfsense.org/index.php/topic,65092.0.html
It did not work for me or I could not get it to work. The manual command works fine, so I only need a way to do that properly on Access without doing anything myself.
Any solutions for that?
-
Think that method will only work if the traffic hits the pfSense interface being monitored with tcpdump. There are a number of possibilities why it may not. Such as network design utilizing switches, subnets, etc.
I'm not certain about this, but do some NICs have ability to wake on access? i.e. when they see a packet with their MAC address as the destination, rather than just a broadcast magic packet? Seems like that would be what you really want if it is possible. Of course depending on network design, pfSense may need a static ARP entry in order for the packet to get there. But that capability already exists.
-
Thank you for your thoughts!
My Network is simple.
It is only the cable into the Fritzbox which uses the Bridgemode to give my pfsense the direct connection.
The 2 Quad NIC's have 7 Ports used. There is no switch or anything else between the Server and the PfSense Box.
How would you do the wakeup with tcpdump? Any suggestions or links ?
I think the WOL is only possible on the Sever if I send a magic package. But I will try some things.
-
My Network is simple.
The 2 Quad NIC's have 7 Ports used.Think we have different idea's about what simple means.
How would you do the wakeup with tcpdump? Any suggestions or links ?
If I understand the question, I wouldn't and neither would anyone else. tcpdump is a packet capture utility. You may have misunderstood what I was saying.
That script you linked to uses tcpdump to monitor one specific pfSense network interface for traffic destined to the machine desired to auto-wake. When it detects that traffic it sends a WoL magic packet. If the traffic to that machine does not hit the one specific pfSense network interface that is being monitored by the tcpdump, then this method will not work to wake up the machine.
If that script/tcpdump is monitoring the interface to which the sleeping machine is connected. After a short time the ARP entry will be removed and then pfSense won't know where to send traffic for that machine. So the traffic will never be detected by the script/tcpdump. And thus no magic packet will be sent. One potential work around for that is to set that machine to have a static ARP entry in pfSense. So pfSense will always know where it is, even when it's sleeping.
An easy way to set up a static ARP table entry is in Services / DHCP Server. Select the appropriate interface and scroll to bottom of page to add a DHCP static mapping for this interface. In the edit screen enter the MAC address, IP Address, Hostname, and check the ARP Table Static Entry box. Add a description if you like too.
-
Thank you, I added that now.
Where would you place the script to load it propery?
In here?
/usr/local/etc/rc.d/