WoL from device on separate interface
-
Hi all,
I am trying to get WoL to work using a skill on my Alexa device. Problem is, Alexa is on my different network than the computer I want to turn on with it. Does anybody know if it is possible to establish a rule or change a setting to get Alexa to successfully hit my computer with a magic packet from a separate network? I can move the computer over to the other network, but it's going to take some cable and some more switches and I would love to avoid that.
My computer is on LAN1. My Alexa device is on LAN2. WoL works from Gateway but not from Alexa device. Can I create a bridge of some sort?
TIA.
-
Generally, no. WoL packets are not IP and don't pass through routers. However, there is a method of using a UDP packet, which will pass through routers. I don't know if pfSense supports this.
-
wakeonlan under Ubuntu uses UDP port 9 and goes cross subnet.
pi@homebridge:~ $ wakeonlan -i 172.16.1.23 -p 9 a8:20:66:10:fc:b7
Sending magic packet to 172.16.1.23:9 with a8:20:66:10:fc:b7
pi@homebridge:~ $ wakeonlan -h
Usage
wakeonlan [-h] [-v] [-i IP_address] [-p port] [-f file] [[hardware_address] ...]Options
-h
this information
-v
displays the script version
-i ip_address
set the destination IP address
default: 255.255.255.255 (the limited broadcast address)
-p port
set the destination port
default: 9 (the discard port)
-f file
uses file as a source of hardware addressesSee also
wakeonlan(1)pi@homebridge:~ $
-
What specific alexa skill are you using? I have alexa, and its on its own vlan... I could test this trying to wake up my pc, etc.
I am curious on this skill how it knows what mac and or IP to send the packet too..
You would prob be better off getting something that you can kick off on alexa that triggers the wol and from the same network as your device sits on..
On the other hand.. How much do you think your saving in elec cost putting your PC to sleep? ;)
My PC uses like 45 watts when its idle.. That cost at 12 cents per kwh $0.0054 per hour to run... So lets say you save that per hour.. And you leave your pc off for 18 hours a day.. Your saving a 9 cents... Is 9 cents a day worth the hassle of even setting something like this up? Really? With all the hassles of devices having issues coming out of standby? Your wol not working when you "need" it to work.. To save a dime a day?
The only thing I have go into power saving mode is my monitors.. That is my 2 cents on that matter ;) But more than happy to look into getting wol to work from alexa to another subnet.
Having stuff go into standby mode might make sense if you have 1000 PCs in an office and users forget to shutdown their shit over the weekend or when they leave for the day.. Or if your talking a laptop that running on batter and you don't want it suck up all its battery time sitting there idle because you stepped away for 3 hours.. But in home setup with 1 or 2 PCs - your time and effort trying to even set this up will take you 10 years to get back in cost savings ;) And thats if actually works and never fails - since one failure of it not coming on when you want it to - will cost your another 3 years in savings ;) for the time wasted/spent trying to figure out why.. Thats if you count your time at slave labor cost -- you know like the little kid making your tennis shows in Thailand ;)
Do you live in part of the world where electric prices are 30 some cents a kwh or something?
-
@NogBadTheBad said in WoL from device on separate interface:
wakeonlan under Ubuntu uses UDP port 9 and goes cross subnet.
Does pfSense support that? It has to recognize it's WoL and then broadcast the WoL frame to the network.
-
It does seem to work.
I run homebridge on my IOT VLAN from a Raspberry Pi, there is a plug-in for my Synology NAS that sits on a different VLAN and I can restart my NAS remotely using the Apple home app on my iPhone.
Just done a packet capture on the interface the NAS sits on:-
pi@homebridge:~ $ wakeonlan -i 172.16.2.10 -p 9 00:11:32:4c:81:69 Sending magic packet to 172.16.2.10:9 with 00:11:32:4c:81:69 pi@homebridge:~ $ 14:13:56.884304 00:08:a2:0a:9d:cb > 00:11:32:4c:81:69, ethertype IPv4 (0x0800), length 144: (tos 0x0, ttl 63, id 63699, offset 0, flags [DF], proto UDP (17), length 130) 172.16.4.29.45220 > 172.16.2.10.9: [udp sum ok] UDP, length 102
-
Only way that could work is if pfsense knows the mac of that IP before.. So you have setup wol in pfsense so it always knows the mac of that IP, or you setup a static arp entry? etc..
I can send a unicast packet all day long to pfsense on whatever port.. But if pfsense doesn't have the mac of the destination IP its not going to send on the packet.
-
@NogBadTheBad said in WoL from device on separate interface:
wakeonlan -i 172.16.1.23 -p 9 a8:20:66:10:fc:b7
The destination up address is in the wol command.
-
And again... pfsense is not going to send that on to the IP without knowing the mac.. If the device has been OFF.. it wouldn't know the mac without some sort of static setting.. Or the device would have to answer an arp, which they don't do if off.
its not going to look in that packet and say oh you want to send to that mac, let me do that for you ;)
-
My IP address are allocated via a DHCP reservation so they are in the routers ARP table.
-
There you go - yes if the mac is in the arp table then it will send it on ;) But billy bob user prob doesn't know to do that..
-
@NogBadTheBad said in WoL from device on separate interface:
My IP address are allocated via a DHCP reservation so they are in the routers ARP table.
If you're talking about DHCP static mappings, that's not enough. For example, my ThinkPad hasn't been turned on since yesterday afternoon. While it's IP address is mapped to a MAC in the DHCP static mappings, it does not appear in the arp cache. For a MAC to be in the cache, the device must have recently sent a packet to/through pfSense.
-
^ agreed it won't be listed in the arp table - but pfsense might look there for mac on IP? Or if you have it in your wol settings, maybe it looks there.
But yeah pfsense needs to know the mac to send on the packet to it.. When pfsense doesn't know the mac it will arp, but if the box is off before pfsense can send on the wol it has to know what mac to send it too.
-
Even if it shows as permanent in the arp table?
-
If it shows as perm in the arp table your fine - and how did you do that other than creating a static arp entry.. dhcp reservations do not do that, nor do wol entries that I can tell.
Did you actually create a static arp entry - that for sure would be best way to do it.
-
Via static on the DHCP page.
-
Nope that doesn't do it.. I have plenty of dhcp reservations.. You mean this?
That has the problem that devices that are not listed can not talk to pfsense, ie get to the internet or any other vlan..
-
There is another setting for each individual mapping, which applies only to the IP/MAC pair.
-
@johnpoz said in WoL from device on separate interface:
Nope that doesn't do it.. I have plenty of dhcp reservations.. You mean this?
That has the problem that devices that are not listed can not talk to pfsense, ie get to the internet or any other vlan..
yes there