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

    Place for custom startup scripts & commands

    General pfSense Questions
    4
    4
    12.0k
    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.
    • S
      sloan
      last edited by

      I want to place a simple sniffer command to run at startup I looked for a file like rc.local in Linux,  couldn't find one.  Can I just create a file /etc/rc.sniffscript and make it an executable file?

      cat rc.sniffscript

      tcpdump -i dc1 not port 22 and not port 53 and not port 110 and not arp and not dst host expertcity.com  >> /var/log/sniffer

      I would just try it but I don't want to break anything.

      PFS 2.0 ALPHA-ALPHA on x86 :FreeSWITCH

      1 Reply Last reply Reply Quote 0
      • S
        sullrich
        last edited by

        Use the shellcmd family of commands:

        http://faq.pfsense.org/index.php?sid=325876&lang=en&action=artikel&cat=10&id=38&artlang=en

        1 Reply Last reply Reply Quote 0
        • J
          Justinw
          last edited by

          Just make a shell script and put it in /usr/local/etc/rc.d, make it end in .sh
          The box will execute it every time the box starts/restarts

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

            The shellcmd options in the config.xml get backed up with the config.xml. I prefer this attempt as it lets you easier restore a system.

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