Commit 8de70201 authored by Ad Schellevis's avatar Ad Schellevis

(ids) add syslog settings, related to https://github.com/opnsense/core/issues/997

parent 5399370d
......@@ -25,4 +25,16 @@
<help><![CDATA[Select interface(s) to use. When enabling IPS, only use physical interfaces here (no vlans etc).]]></help>
<hint>Type or select interface.</hint>
</field>
<field>
<id>ids.general.AlertLogrotate</id>
<label>Rotate log</label>
<type>dropdown</type>
<help><![CDATA[Rotate alert logs at provided interval.]]></help>
</field>
<field>
<id>ids.general.AlertSaveLogs</id>
<label>Save logs</label>
<type>text</type>
<help><![CDATA[Number of logs to keep.]]></help>
</field>
</form>
......@@ -119,6 +119,23 @@
<ValidationMessage>Related cron not found.</ValidationMessage>
<Required>N</Required>
</UpdateCron>
<AlertLogrotate type="OptionField">
<Required>N</Required>
<default>W0D23</default>
<BlankDesc>Default</BlankDesc>
<OptionValues>
<W0D23>Weekly</W0D23>
<D0>Daily</D0>
</OptionValues>
<ValidationMessage>Please select a valid rotation</ValidationMessage>
</AlertLogrotate>
<AlertSaveLogs type="IntegerField">
<Required>N</Required>
<default>4</default>
<MinimumValue>1</MinimumValue>
<MaximumValue>1000</MaximumValue>
<ValidationMessage>Enter a valid number of logs to save</ValidationMessage>
</AlertSaveLogs>
</general>
</items>
</model>
......@@ -2,5 +2,7 @@
{% if helpers.exists('OPNsense.IDS.general') and OPNsense.IDS.general.enabled|default("0") == "1" %}
/var/log/suricata/stats.log root:wheel 640 7 * $D0 B /var/run/suricata.pid 1
/var/log/suricata.log root:wheel 640 7 * $D0 B /var/run/suricata.pid 1
/var/log/suricata/eve.json root:wheel 640 4 * $W0D23 B /var/run/suricata.pid 1
/var/log/suricata/eve.json root:wheel 640 {{ OPNsense.IDS.general.AlertSaveLogs|default("4") }} * ${{
OPNsense.IDS.general.AlertLogrotate|default("W0D23")
}} B /var/run/suricata.pid 1
{% endif %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment