IDS.xml 2.47 KB
Newer Older
1 2 3 4 5 6
<model>
    <mount>//OPNsense/IDS</mount>
    <description>
        OPNsense IDS
    </description>
    <items>
7 8 9 10 11 12 13 14 15 16
        <rules>
            <rule type="ArrayField">
                <sid type="IntegerField">
                    <ValidationMessage>sid should be a number</ValidationMessage>
                    <Required>Y</Required>
                </sid>
                <enabled type="BooleanField">
                    <default>1</default>
                    <Required>Y</Required>
                </enabled>
17 18 19 20 21 22 23 24
                <action type="OptionField">
                    <Required>Y</Required>
                    <default>alert</default>
                    <OptionValues>
                        <alert>Alert</alert>
                        <drop>Drop</drop>
                    </OptionValues>
                </action>
25 26
            </rule>
        </rules>
27 28 29 30
        <files>
            <file type="ArrayField">
                <filename type="TextField">
                    <Required>Y</Required>
31
                    <mask>/^([\t\n\v\f\r\- 0-9a-zA-Z.,_\x{00A0}-\x{FFFF}]){1,255}$/u</mask>
32 33 34 35 36 37 38
                </filename>
                <enabled type="BooleanField">
                    <default>0</default>
                    <Required>Y</Required>
                </enabled>
            </file>
        </files>
39 40 41 42 43
        <general>
            <enabled type="BooleanField">
                <default>0</default>
                <Required>Y</Required>
            </enabled>
44 45 46 47
            <ips type="BooleanField">
                <default>0</default>
                <Required>Y</Required>
            </ips>
48 49
            <interfaces type="InterfaceField">
                <Required>Y</Required>
50
                <default>wan</default>
51
                <multiple>Y</multiple>
52 53 54 55
                <filters>
                    <enable>/^(?!0).*$/</enable>
                </filters>
            </interfaces>
56 57 58 59 60 61 62 63 64 65 66 67 68 69
            <UpdateCron type="ModelRelationField">
                <Model>
                    <queues>
                        <source>OPNsense.Cron.Cron</source>
                        <items>jobs.job</items>
                        <display>description</display>
                        <filters>
                            <origin>/IDS/</origin>
                        </filters>
                    </queues>
                </Model>
                <ValidationMessage>Related cron not found</ValidationMessage>
                <Required>N</Required>
            </UpdateCron>
70
        </general>
71 72
    </items>
</model>