Snort: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 17: Line 17:


=== Configuring Snort ===
=== Configuring Snort ===
{{Warning|title=Beta Feature|Currently there is no proper way to inspect Snort's error output, so invalid configs may result in the Snort analysis seemingly crashing for no reason. At the moment we recommend testing the validity of the configuration with a local Snort installation.}}
==== Config====
==== Config====
Snort can be configured via Lua scripts which are executed in a sandboxed environment at startup. The multimeter is delivered with the default configuration files of Snort, with the exception that some of the variables have been moved to a new <code>config.lua</code> file. This file is included before everything else.
Snort can be configured via Lua scripts which are executed in a sandboxed environment at startup. The multimeter is delivered with the default configuration files of Snort, with the exception that some of the variables have been moved to a new <code>config.lua</code> file. This file is included before everything else.
Line 30: Line 29:
The simple editor provides only a few values that can be edited. Users are encouraged to adjust these values according to their network setup. Setting the home and external network is the only strictly necessary configuration, as the other values are derived from them. The default values for these networks is "any". Refer to the Snort documentation (see above) to find out which values are allowed. Values with a dollar sign ($) in front of them are variables, e.g. setting your DNS servers to <code>$HOME_NET</code> will set the vaule of the DNS servers field to the value of the Home network field. This is the default.
The simple editor provides only a few values that can be edited. Users are encouraged to adjust these values according to their network setup. Setting the home and external network is the only strictly necessary configuration, as the other values are derived from them. The default values for these networks is "any". Refer to the Snort documentation (see above) to find out which values are allowed. Values with a dollar sign ($) in front of them are variables, e.g. setting your DNS servers to <code>$HOME_NET</code> will set the vaule of the DNS servers field to the value of the Home network field. This is the default.


Modifications to these values are not committed until either the "Apply" or "Save" button are pressed. Saving the settings will close the modal, while applying them will commit the changes but keep the modal open. Cancelling will cause all unsaved changes to be discarded (a warning modal will ask for confirmation before discarding).
Modifications to these values are not committed until the "Apply" button is pressed.


=====Lua editor=====
=====Lua editor=====
Line 38: Line 37:
'''While the <code>config.lua</code> is displayed in this list, it is discouraged to edit it directly.'''
'''While the <code>config.lua</code> is displayed in this list, it is discouraged to edit it directly.'''


It is possible to create new files via the button at the bottom of the file list. Hovering over a file reveals two buttons for deleting a file and reloading a file. Deleting a file will mark it for deletion, but that change will not be committed until "Save" or "Apply" are pressed. Reloading a file causes it to be re-fetched from the multimeter and discards all changes to that file. A file can be renamed by selecting it and pressing F2.
It is possible to create new files via the button at the bottom of the file list. Hovering over a file reveals four buttons:
 
* ''Rename file''
* ''Delete file''
* ''Download file''
* ''Restore file''
 
Changes to files (including deleting a file) are not committed until the "Apply" button is pressed. Restoring a file discards uncommitted changes. In the case of default config files (i.e. files that are shipped by default with the multimeter firmware) can also be deleted and recovered later. After deletion they will appear greyed out in the file list.


==== Rules ====
==== Rules ====
52

edits