Place for custom startup scripts & commands
-
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.
-
Use the shellcmd family of commands:
http://faq.pfsense.org/index.php?sid=325876&lang=en&action=artikel&cat=10&id=38&artlang=en
-
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 -
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.