Navigation

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

    After boot: start script which do WOL

    General pfSense Questions
    2
    9
    5725
    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 ")

        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

            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>

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

                    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

                      Products

                      • Platform Overview
                      • TNSR
                      • pfSense
                      • Appliances

                      Services

                      • Training
                      • Professional Services

                      Support

                      • Subscription Plans
                      • Contact Support
                      • Product Lifecycle
                      • Documentation

                      News

                      • Media Coverage
                      • Press
                      • Events

                      Resources

                      • Blog
                      • FAQ
                      • Find a Partner
                      • Resource Library
                      • Security Information

                      Company

                      • About Us
                      • Careers
                      • Partners
                      • Contact Us
                      • Legal
                      Our Mission

                      We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

                      Subscribe to our Newsletter

                      Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

                      © 2021 Rubicon Communications, LLC | Privacy Policy