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

    Run command line at startup not working after reboot

    Scheduled Pinned Locked Moved General pfSense Questions
    7 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.
    • F
      finite9
      last edited by

      to get Wake on WAN (WOL) working so that I can start my PC from my mobile phone, I enter an arp command to assign an IP address to a dummy MAC:

      arp -s 192.168.1.253 FF:FF:FF:FF:FF:FF

      And then I open port 7 to this IP.

      Thats the short of it.  It works great, but the arp command does not get run when I reboot my pfsense router.  I have to enter/run the command manually after reboot.

      Does anyone know why this is?

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

        Where have you entered this command so that you expect it to run at start?

        I would use the Shellcmd package to run it.
        https://doc.pfsense.org/index.php/Executing_commands_at_boot_time

        Steve

        1 Reply Last reply Reply Quote 0
        • N
          NOYB
          last edited by

          There is static ARP capabilities in the DHCP static mappings that was created for just such uses.  Recommend using that instead of a command line.

          Services - DHCP Server - DHCP Static Mappings for this interface (bottom of page) - ARP Table Static Entry (check the box to create an ARP Table Static Entry for this MAC & IP Address pair.)

          The settings I use:
          MAC Address: ff:ff:ff:ff:ff:ff
          IP Address: 192.168.2.254
          Hostname: Broadcast-Agent
          Description: Broadcast Agent (ex: WoL Magic Packet)

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

            ^ Yes, very good point.

            Steve

            1 Reply Last reply Reply Quote 0
            • F
              finite9
              last edited by

              thanks for the replies.  I'll have a look into using the dhcp method instead.  I was using the Shellcmd package, but I forgot to mention that.  It doesn't work anyway with the Shellcmd package after a reboot.

              1 Reply Last reply Reply Quote 0
              • F
                finite9
                last edited by

                3 months to get around to looking into the dhcp static mappings and 5 minutes to fix it.

                thanks, it works like a charm.

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  The shellcmd method may have worked if you put the full path to arp: /usr/sbin/arp

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

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