Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    WoL from device on separate interface

    Scheduled Pinned Locked Moved Firewalling
    19 Posts 4 Posters 1.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • NogBadTheBadN
      NogBadTheBad
      last edited by NogBadTheBad

      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 addresses

      See also
      wakeonlan(1)

      pi@homebridge:~ $

      Andy

      1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

      JKnottJ 1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by johnpoz

        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?

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        1 Reply Last reply Reply Quote 0
        • JKnottJ
          JKnott @NogBadTheBad
          last edited by

          @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.

          PfSense running on Qotom mini PC
          i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
          UniFi AC-Lite access point

          I haven't lost my mind. It's around here...somewhere...

          NogBadTheBadN 1 Reply Last reply Reply Quote 0
          • NogBadTheBadN
            NogBadTheBad @JKnott
            last edited by NogBadTheBad

            @JKnott

            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
            

            Andy

            1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

            1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator
              last edited by

              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.

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

              1 Reply Last reply Reply Quote 0
              • NogBadTheBadN
                NogBadTheBad
                last edited by

                @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.

                Andy

                1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by johnpoz

                  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 ;)

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                  NogBadTheBadN 1 Reply Last reply Reply Quote 0
                  • NogBadTheBadN
                    NogBadTheBad @johnpoz
                    last edited by

                    @johnpoz

                    My IP address are allocated via a DHCP reservation so they are in the routers ARP table.

                    Andy

                    1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                    JKnottJ 1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator
                      last edited by

                      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..

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                      1 Reply Last reply Reply Quote 0
                      • JKnottJ
                        JKnott @NogBadTheBad
                        last edited by

                        @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.

                        PfSense running on Qotom mini PC
                        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                        UniFi AC-Lite access point

                        I haven't lost my mind. It's around here...somewhere...

                        1 Reply Last reply Reply Quote 0
                        • johnpozJ
                          johnpoz LAYER 8 Global Moderator
                          last edited by

                          ^ 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.

                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                          If you get confused: Listen to the Music Play
                          Please don't Chat/PM me for help, unless mod related
                          SG-4860 24.11 | Lab VMs 2.8, 24.11

                          1 Reply Last reply Reply Quote 0
                          • NogBadTheBadN
                            NogBadTheBad
                            last edited by

                            Even if it shows as permanent in the arp table?

                            Andy

                            1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                            1 Reply Last reply Reply Quote 0
                            • johnpozJ
                              johnpoz LAYER 8 Global Moderator
                              last edited by

                              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.

                              An intelligent man is sometimes forced to be drunk to spend time with his fools
                              If you get confused: Listen to the Music Play
                              Please don't Chat/PM me for help, unless mod related
                              SG-4860 24.11 | Lab VMs 2.8, 24.11

                              1 Reply Last reply Reply Quote 0
                              • NogBadTheBadN
                                NogBadTheBad
                                last edited by NogBadTheBad

                                Via static on the DHCP page.

                                Andy

                                1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                                1 Reply Last reply Reply Quote 0
                                • johnpozJ
                                  johnpoz LAYER 8 Global Moderator
                                  last edited by johnpoz

                                  Nope that doesn't do it.. I have plenty of dhcp reservations.. You mean this?

                                  staticarp.jpg

                                  That has the problem that devices that are not listed can not talk to pfsense, ie get to the internet or any other vlan..

                                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                                  If you get confused: Listen to the Music Play
                                  Please don't Chat/PM me for help, unless mod related
                                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                                  JKnottJ NogBadTheBadN 2 Replies Last reply Reply Quote 0
                                  • JKnottJ
                                    JKnott @johnpoz
                                    last edited by

                                    @johnpoz

                                    There is another setting for each individual mapping, which applies only to the IP/MAC pair.

                                    PfSense running on Qotom mini PC
                                    i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                                    UniFi AC-Lite access point

                                    I haven't lost my mind. It's around here...somewhere...

                                    1 Reply Last reply Reply Quote 0
                                    • NogBadTheBadN
                                      NogBadTheBad @johnpoz
                                      last edited by

                                      @johnpoz said in WoL from device on separate interface:

                                      Nope that doesn't do it.. I have plenty of dhcp reservations.. You mean this?

                                      staticarp.jpg

                                      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

                                      Andy

                                      1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post
                                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.