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

    After boot: start script which do WOL

    General pfSense Questions
    2
    9
    6.3k
    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.
    • H
      hkusulja
      last edited by

      Hi!

      I want to do something..

      when my pfsense computers  power on.. and boots.. everything works.., i wont to do small script which will power on, other computers after pfsense boot..

      something like

      pfsense_startup.sh
        wol mac-my-pc

      WOL (wake-up-on-lan ringing) works when i do it over web interface, i just want that pfsense do automaticaly do wol for some pc-s (mac address)

      can somebody tell me code for that script.. and where i need to put it so it will run automaticaly ?

      (sorry on my bad english)

      thnx

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

        Think this should work :)
        From console

        ee /usr/local/etc/rc.d/wol_start.sh

        
        #!/bin/sh
        wol 00:4F:49:07:0B:5F 00:4F:50:06:12:4F
        
        

        (To exit & save press " esc a a ")

        /Perry
        doc.pfsense.org

        1 Reply Last reply Reply Quote 0
        • H
          hkusulja
          last edited by

          @Perry:

          Think this should work :)
          From console

          ee /usr/local/etc/rc.d/wol_start.sh

          
          #!/bin/sh
          wol 00:4F:49:07:0B:5F 00:4F:50:06:12:4F
          
          

          (To exit & save press " esc a a ")

          thnx i will try

          edit:
          i have a question, why is the mac address twice ?

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

            2 different pc

            I think this will be better
            wol –host=192.168.1.255 -p 69 00:4F:49:07:0B:5F

            more info on http://ahh.sourceforge.net/wol/wol.html

            /Perry
            doc.pfsense.org

            1 Reply Last reply Reply Quote 0
            • H
              hkusulja
              last edited by

              @Perry:

              2 different pc

              I think this will be better
              wol –host=192.168.1.255 -p 69 00:4F:49:07:0B:5F

              more info on http://ahh.sourceforge.net/wol/wol.html

              i get it..
              but i don't want to power on my whole LAN.. only few PCs.. so i will do just wol for each mac address…

              thanks again..

              edit: and how can I easly create cron to start that script every 30 minutes ? :)

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

                but i don't want to power on my whole LAN.. only few PCs.. so i will do just wol for each mac address…

                It is to limit it to 1 pfsense nic and pc mac 00:4F:49:07:0B:5F

                ee /cf/conf/config.xml (add following lines under <cron>)

                <minute>/30</minute>
                                        <hour>
                </hour>
                                        <mday></mday>
                                        <month>
                </month>
                                        <wday>*</wday>
                                        <who>root</who>
                                        <command></command>/usr/local/etc/rc.d/wol_start.sh</cron>

                /Perry
                doc.pfsense.org

                1 Reply Last reply Reply Quote 0
                • H
                  hkusulja
                  last edited by

                  @Perry:

                  but i don't want to power on my whole LAN.. only few PCs.. so i will do just wol for each mac address…

                  It is to limit it to 1 pfsense nic and pc mac 00:4F:49:07:0B:5F

                  hmm, i don't understand.. how is it limited to send magic packet from one nic ? (192.168.1.255)

                  thnx for cron…

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

                    hmm, i don't understand.. how is it limited to send magic packet from one nic ? (192.168.1.255)

                    I mixed some switches so never mind :)

                    /Perry
                    doc.pfsense.org

                    1 Reply Last reply Reply Quote 0
                    • H
                      hkusulja
                      last edited by

                      @Perry:

                      hmm, i don't understand.. how is it limited to send magic packet from one nic ? (192.168.1.255)

                      I mixed some switches so never mind :)

                      ok, but now, how can i specify from which my interface magic packet will be sent ?

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