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

    WOL - not working on ALIX / working on APU in Version 2.2

    Scheduled Pinned Locked Moved General pfSense Questions
    9 Posts 6 Posters 2.0k 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.
    • C Offline
      chsu83
      last edited by

      Hi there,

      Following situation. I've upgraded an APU from 2.2 RC to 2.2. and there Wake up On Lan is working. On an Alix (updated from 2.1 to 2.2) WOL isn't working.
      If I use wake command on Diagnostics, Command Prompt like "wake vr1 AB:CD:.." it works.

      Is the problem related somehow to the different ethernet interface names (vr / re) ?

      1 Reply Last reply Reply Quote 0
      • C Offline
        chsu83
        last edited by

        Is there a way to see which command was issued by the Wake On Lan Action

        1 Reply Last reply Reply Quote 0
        • A Offline
          anenglishman
          last edited by

          I am also having this problem.

          I have a custom build (Intel i3 Sandybridge) which was running pfSense 2.1.5 release.

          I upgraded to 2.2 using the upgrade option within pfSense.

          Ever since then I have been unable to boot the PC via WOL in the usual way. As chsu83 has stated, it works when I use the "wake re1 MAC ADDRESS" command in the 'execute shell command' under the diagnostic page.

          1 Reply Last reply Reply Quote 0
          • F Offline
            flix87
            last edited by

            Same here on Alix after update to 2.2 not able to user wake on lan

            1 Reply Last reply Reply Quote 0
            • D Offline
              doktornotor Banned
              last edited by

              @chsu83:

              Is there a way to see which command was issued by the Wake On Lan Action

              /etc/inc/pfsense-utils.inc

              
              function WakeOnLan($addr, $mac)
              {
                      $addr_byte = explode(':', $mac);
                      $hw_addr = '';
              
                      for ($a=0; $a < 6; $a++)
                              $hw_addr .= chr(hexdec($addr_byte[$a]));
              
                      $msg = chr(255).chr(255).chr(255).chr(255).chr(255).chr(255);
              
                      for ($a = 1; $a <= 16; $a++)
                              $msg .= $hw_addr;
              
                      // send it to the broadcast address using UDP
                      $s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
                      if ($s == false) {
                              log_error(gettext("Error creating socket!"));
                              log_error(sprintf(gettext("Error code is '%1\$s' - %2\$s"), socket_last_error($s), socket_strerror(socket_last_error($s))));
                      } else {
                              // setting a broadcast option to socket:
                              $opt_ret =  socket_set_option($s, 1, 6, TRUE);
                              if($opt_ret < 0)
                                      log_error(sprintf(gettext("setsockopt() failed, error: %s"), strerror($opt_ret)));
                              $e = socket_sendto($s, $msg, strlen($msg), 0, $addr, 2050);
                              socket_close($s);
                              log_error(sprintf(gettext('Magic Packet sent (%1$s) to {%2$s} MAC=%3$s'), $e, $addr, $mac));
                              return true;
                      }
              
                      return false;
              }
              
              
              1 Reply Last reply Reply Quote 0
              • C Offline
                chsu83
                last edited by

                solution on the way: https://redmine.pfsense.org/issues/4318

                1 Reply Last reply Reply Quote 0
                • I Offline
                  ipfftw
                  last edited by

                  Ah yes, I have encountered this bug as well on my 32 bit firewall. All you rich devs with your fancy 64 bit machines!

                  Mine is a p4 firewall. Nothing exotic, just old.

                  I will upgrade it one day, but you guys haven't added enough bloat to warrant it!

                  1 Reply Last reply Reply Quote 0
                  • P Offline
                    phil.davis
                    last edited by

                    @chsu83:

                    solution on the way: https://redmine.pfsense.org/issues/4318

                    You can apply that fix to your pfSense 2.2 system now, and it fixes a bunch of things in places that need to calculate the max address in a subnet.

                    As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                    If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                    1 Reply Last reply Reply Quote 0
                    • I Offline
                      ipfftw
                      last edited by

                      2.2.1 has fixed this issue. WOL works again for me.

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