It’s a great idea…
problem is how a network works and why it wouldn’t do what you want easily.
a simple network configuration;
internet —> home modem/router/WIFI—> laptop, desktop, Plex server, and all the other devices in the home that are networked.
first lets look at that home modem/router/WIFI unit.
it’s either one, two or three devices connected internally or externally but work in the same way.
modem gets its connection from the ISP (cable company, dsl, fios etc) and converts it to an Ethernet connection.
router gets its connection from the modem and then routes the traffic to a VLAN port or ports (wan to lan some may have more then one lan port connection)
WIFI is a VLAN and would connect to other VLAN ports. (lets just lets keep it simple for this discussion)
VLAN ports can be configured in a managed unit in different ways, one is to create sub nets. (sub-net 192.168.10.1, 192.168.20.1, the 10 and 20 are sub-nets)
Traffic from and to the internet have different protocols depending of their function.
Here we are interested in mainly the TCP protocol, the one that sends requests to the Plex Server at port 32400 (default port)
TCP packet have a source IPaddress / port, destination IPaddress / port and a bunch of other info besides the data.
This info is used at the routing layer of the protocol, At a lower level of the packet protocol is the source and destination MAC address,
MAC address is the physical hardware address of a device. VLANs and forward packets based on the destination MAC addresses.
The problem is that a TCP packet is routed using the IPaddress and the MAC address of the device. All devices receives only packets with a destination for them at that interface.
Placing a sniffer (Wireshark as an example) on a system will only see packets that have it as a destination… So the packets with a destination for say a Plex server on another system won’t be seen.
(note other protocol packets and broadcast packets will also show up depending on the configuration)
You would need to intercept the packet at a place it’s know to travel. example is the router or some other device in the chain
One solution is the dd-wrt router script;
The dd-wrt script is installed in the router and does the following…
Setting a trap that looks for a specif ipaddress/port and does something with it, in most cases writes it to the system log or some other log file. (changing the system ip address or port in the system would also requires this script to also be changed).
the script runs 24/7 looking at the log for that specific entry and when found sends out the corresponding WOL packet.
note: the WOL packet is a broadcast packet either (IP: 255.255.255.255 or sub-net 192.168.10.255 if your sub-net is 10 and MAC: FF:FF:FF:FF:FF:FF)
broadcast packets go to all devices in the group its set for.
Another option would be to use a system like what you propose to monitor traffic.
you would need a way to intercept (read) the traffic and then do what basically the dd-wrt script does.
some routers and managed switches allow you to configure a mirror port (I haven’t see many, and usually on enterprise equipment), but what it does is mirror all traffic on one port to another port where you can read the packets in real time.
Your advantage would be that you could control a number of systems and wake them as needed. Monitor the activity and detect if a system has stopped working, add a remote wake up feature etc…
Note: this could be done with the dd-wrt script, but the routers power and speed become a factor as it has to process all the packets in real time and run the script. that’s why it’s usually designed to handle just one system.
That is why WOL is not an easy task to include in the Plex software. Apps that do have the WOL feature have to open up ports 7 or 9 in the router to attempt to accomplish this. Most routers don’t allow lower port number to be forwarded like that, it a security risk. most have you pick a higher port number and forward it to either 7 or 9. Since Plex is well known and opening up a port like that would be a risk. That’s why other software that offers that feature usually requires their software to be running on a system and is used to direct the WOL commands within the lan network it resides in. They include commands within there excising command chain to facilitate this feature, eliminating the open port risk, since it has to be processed by the active software first. Plex could do the same thing but it would require one system to be running, thats ok in a multi Plex PMS network setup like mine, but wouldn’t do much for the average PMS user.
Yes, I am doing the later, it’s a hack job… and I’ll leave it at that since it would have to be tailored to each network configuration.
But i would love to see Plex add it to there feature list, but I’m sure that most would like it if they kept the resources on fixing bugs etc…
that’s my 2 cents…