Configuration Profiles¶
Configuration Profiles are a collection of settings that configures a service for a particular use-case, In IDSTower v2.3.0, Configuration Profiles were introduced to give users pre-tested configuration blueprints for common use-cases that Suricata is used for.
More Profiles will be added to the coming version, This guide list the available Configuration Profiles and the use cases that they solve.
Settings and configuration file templates¶
A configuration profile is a set of settings, which you change on the cluster’s Configs tab (see Cluster Configs Tab). They come in two kinds:
Ordinary settings hold a single value, for example Home Network Ranges on the Network tab. You change them in place, for example in a text box, a number field or a Yes/No switch. Hovering over a setting’s name shows its Template Key, such as
Suricata_HOME_NET.Configuration file templates hold the whole content of a configuration file. They are on the Advanced tab, each shown as the file’s name and a short description with a View and an Edit button, which open the file in an editor.
When the configuration is deployed, IDSTower fills in each template and writes the result to the host as that file, replacing what the file held before. The profiles IDSTower ships contain these templates:
Template |
Written on the host as |
|---|---|
suricata.yaml, instance-config.yaml, custom-config.yaml, threshold.config, classification.config, reference.config |
The file of the same name in |
suricata service file |
The instance’s systemd service, |
filebeat.yml template |
|
filebeat service file |
Filebeat’s systemd service, |
Templates are written in Jinja2, except that statements such as loops and conditions use [[% ... %]] instead of {% ... %}. Each {{ ... }} placeholder is replaced as the file is written: most of them by the value of the setting whose Template Key they name, which is how the ordinary settings reach the configuration files, and the rest by details of the host and instance, such as the instance name. For example, instance-config.yaml contains
vars.address-groups.HOME_NET: "[{{ Suricata_HOME_NET }}]"
and with the default Home Network Ranges the host receives
vars.address-groups.HOME_NET: "[10.0.0.0/8,172.16.0.0/12,192.168.0.0/16]"
Removing a placeholder while editing a template stops its setting from reaching that file.
An edited template is saved like any other setting: Apply Changes closes the editor, and Save stores the change as a new config version. In a Config Group other than Default, you override a template with the pencil icon, as you would any other setting. The group then keeps its own copy of the whole file, marked Custom, so later edits to the Default group’s template no longer reach that group’s hosts.
Note
Changing or upgrading the configuration profile replaces your templates, except custom-config.yaml. When the cluster is switched to another configuration profile, or upgraded to a newer version of its profile, every ordinary setting the two profiles share keeps its current value, including settings you never changed. Where the new profile has a different default, change the setting yourself: for example, switching from IDS to IDS + NSM leaves the event types on the Output tab switched off. Templates are not kept: each one becomes the new profile’s version of the file, and a Config Group that had its own copy goes back to the Default group’s. The exception is custom-config.yaml: your edits to it are kept, in the Default group and in a Config Group with its own copy, and an untouched one takes the new profile’s version. Your edited templates remain in the earlier config versions. Select one in the Config Version menu and use View to copy your changes (not the whole file, which would undo the new profile’s own changes) into the new template.
Tip
For Suricata, make changes that have no setting of their own in custom-config.yaml rather than in suricata.yaml or instance-config.yaml. suricata.yaml loads custom-config.yaml last, so its settings override the other two, and a profile change or upgrade keeps your edits to it (see Suricata Configuration Profiles).