@boobletins said in reference.config - overwritten after edit?:
Yes, that worked.
So it's possible that either I manually edited reference.config in the past or clobbered it by unzipping Snort rules there or something.
My apologies Bill -- looks like I managed to break it without knowing and assumed it was broken in the code.
Glad you got it sorted out.
The $cfgs variable is an array in PHP. It is loaded with the filenames of all the reference.config files it finds in the /tmp directory where the rules tarball is unpacked. Each vendor's rules unpack into their own sub-directory under /tmp. The $suricatadir variable does indeed point to /usr/local/etc/suricata where the original reference.config file that was installed with the binary portion of the package is located. So if you have both Snort and ET rules enabled, during a rules update three different reference.config files will be combined into a single reference.config with any duplicates removed. That file will be written to the interface sub-directory under /usr/local/etc/suricata/suricata_xxxx for each Suricata instance.