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

    Wake on lan from mac adresses from DHCP Lease

    Scheduled Pinned Locked Moved General pfSense Questions
    14 Posts 6 Posters 1.4k 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.
    • V
      viragomann
      last edited by viragomann

      Why want you do that?

      If your only intention is that you have the MACs in the WOL list you may as well go to Status > DHCP Leases, here you will find a wake-up button at the right under "Actions" for all MACs which got leases and are offline right now.
      Maybe you need to increase the DHCP maximum lease time.

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        I imagine wanting to wake all the laptops on a VLAN at once.

        There's no way to do that in pfSense so you would need to use a script of some sort. You could pull them from the ARP table or DHCP leases. Adding them to the config would be more tricky if you wanted to wake from the GUI. Might be easier to script that too.

        Steve

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

          @stephenw10 said in Wake on lan from mac adresses from DHCP Lease:

          I imagine wanting to wake all the laptops on a VLAN at once.

          I have the same question - when exactly are you wanting/needing to WOL these devices... And they are all "wired" laptops? Or they are wireless - which would make more sense for laptops... Do they support WOWLAN?

          If you would give more details of your setup, and what exactly is the issue your trying to overcome with the wol stuff we could discuss possible solutions to your dilemma

          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
          • P
            pprasonexay
            last edited by

            @johnpoz @stephenw10 @viragomann
            Thanks your for your replies

            "Why want you do that?"

            I work in a training center every monday i have to (without the wake on lan ) turn on every laptops so our inventory script (script on startup) can send information to our server inventory ( memory on hdd, ram, days being offline etc...) some students had already stolen someslaptops and because sometimes we have to upload some files on these computers for some reason (we rent our classroom when they are empty)
            My CEO ask for an inventory pretty often that’s why we do it like that.

            Since our laptops are for our trainees they are not in a domain, they are all « wired » and do not support wowlan.
            Our student are part time at work/school, so when a group is at work the other one are at school, the numbers of student changes every week so working with laptop is easier for us.
            We have 4 centers but have only 3 technicians + 1 admin (wich is always with a tech) so being able to use WOL when a tech isnt present is really helpfull.
            Until now i would take the mac addresses from the DHCP lease and put them manually in the WOL service, but since we move the laptops every week it takes a lot of time just doing that.
            Sorry for my english, it’s not my main language

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

              @pprasonexay said in Wake on lan from mac adresses from DHCP Lease:

              from the DHCP lease and put them manually in the WOL service

              You mean the simple click button to add it..

              I would throw out a suggestion... You want to wake all the boxes currently connected to the network right.. And you have a full inventory right.. Wouldn't it be easy to just get a "full" list of every laptop mac you have from your inventory.. And add it to some wol script you run... No big deal sending wol to devices that are not there ;)

              You could also just put all these details in a file from your inventory.. Then just run the wol command directly from pfsense with the -f option to use the details from this file.

              If you want them in the gui - you could export the wol xml via backup, then edit it to have all your devices mac in it then restore the xml.

              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 @pprasonexay
                last edited by

                @pprasonexay

                One question, do those laptops support WoL?

                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
                • A
                  akuma1x @pprasonexay
                  last edited by

                  @pprasonexay said in Wake on lan from mac adresses from DHCP Lease:

                  @johnpoz @stephenw10 @viragomann
                  Thanks your for your replies
                  I work in a training center every monday i have to (without the wake on lan ) turn on every laptops so our inventory script (script on startup) can send information to our server inventory...

                  I don't think that any WOL command can actually "turn on" a computer, like you say.

                  Jeff

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

                    It can ;) And from the take of the posts - they are already doing it, just manually adding the devices to the wol list in pfsense.

                    But yes the device your wanting to "wakeup" has to support wol and it has to be enabled ;)

                    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

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      akuma1x @johnpoz
                      last edited by

                      @johnpoz Ok, my mistake. Sorry. I have simply not come across one yet that can do that. Or, actually needed to wake a powered off computer.

                      Jeff

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

                        @akuma1x

                        I have an IBM Netfinity server here that supports that. However my desktop computer that I had a few years ago didn't. I don't know about my current desktop, as I haven't checked. My ThinkPad E520 doesn't appear to. So, it all depends on the hardware, but you're more likely to find it in server grade gear than consumer level.

                        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 johnpoz

                          WOL is pretty standard these days. Pretty much anything supports it.. Now WOWLAN is a different matter, which is why asked if wired or not, etc.

                          But sounds like to me that its already working for the devices, and just wants an easy way to get the list... But since they have a full inventory of all devices they should already have the info they need... just send out the wol to all your macs... Only the ones on that layer 2 are going to answer, etc. Say that is 25 of 200.. its no big deal that your sending an extra 175 wol packets that nobody will answer too.

                          example: your thinkpad e520
                          https://support.lenovo.com/us/en/downloads/ds013949

                          Enabling Wake on LAN from Standby for ENERGY STAR for Windows 10 (32-bit, 64-bit), 8.1 (32-bit, 64-bit), 8 (32-bit, 64-bit), 7 (32-bit, 64-bit), Vista (32-bit, 64-bit), XP (32-bit, 64-bit)

                          Your E520 is listed, with pretty much every other box they have made ;)

                          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
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            @johnpoz said in Wake on lan from mac adresses from DHCP Lease:

                            just send out the wol to all your macs... Only the ones on that layer 2 are going to answer

                            This seems like a good call. I assume the scripts you have on each laptop then run when it boots and report in so you can see which devices are present.

                            Steve

                            1 Reply Last reply Reply Quote 0
                            • P
                              pprasonexay
                              last edited by

                              @johnpoz @JKnott @akuma1x

                              I will try your suggestion, didn't think about doing that that way!

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