Update template for ossec.conf (Manager)
This commit is contained in:
parent
88d3ea22dd
commit
9d607c2a42
@ -1,4 +1,4 @@
|
|||||||
#jinja2: trim_blocks: False
|
#jinja2: lstrip_blocks: True
|
||||||
<!--
|
<!--
|
||||||
Wazuh - Manager - Default configuration
|
Wazuh - Manager - Default configuration
|
||||||
More info at: https://documentation.wazuh.com
|
More info at: https://documentation.wazuh.com
|
||||||
@ -65,8 +65,12 @@
|
|||||||
{% for connection in wazuh_manager_config.connection %}
|
{% for connection in wazuh_manager_config.connection %}
|
||||||
<remote>
|
<remote>
|
||||||
<connection>{{ connection.type }}</connection>
|
<connection>{{ connection.type }}</connection>
|
||||||
{% if connection.port is defined %}<port>{{ connection.port }}</port>{% endif %}
|
{% if connection.port is defined %}
|
||||||
{% if connection.protocol is defined %}<protocol>{{ connection.protocol }}</protocol>{% endif %}
|
<port>{{ connection.port }}</port>
|
||||||
|
{% endif %}
|
||||||
|
{% if connection.protocol is defined %}
|
||||||
|
<protocol>{{ connection.protocol }}</protocol>
|
||||||
|
{% endif %}
|
||||||
{% if connection.allowed_ips is defined %}
|
{% if connection.allowed_ips is defined %}
|
||||||
{% for allowed_ip in connection.allowed_ips %}
|
{% for allowed_ip in connection.allowed_ips %}
|
||||||
<allowed-ips>{{ allowed_ip }}</allowed-ips>
|
<allowed-ips>{{ allowed_ip }}</allowed-ips>
|
||||||
@ -77,9 +81,15 @@
|
|||||||
<denied-ips>{{ denied_ip }}</denied-ips>
|
<denied-ips>{{ denied_ip }}</denied-ips>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if connection.local_ip is defined %}<local_ip>{{ connection.local_ip }}</local_ip>{% endif %}
|
{% if connection.local_ip is defined %}
|
||||||
{% if connection.ipv6 is defined %}<ipv6>{{ connection.ipv6 }}</ipv6>{% endif %}
|
<local_ip>{{ connection.local_ip }}</local_ip>
|
||||||
{% if connection.queue_size is defined %}<queue_size>{{connection.queue_size}}</queue_size>{% endif %}
|
{% endif %}
|
||||||
|
{% if connection.ipv6 is defined %}
|
||||||
|
<ipv6>{{ connection.ipv6 }}</ipv6>
|
||||||
|
{% endif %}
|
||||||
|
{% if connection.queue_size is defined %}
|
||||||
|
<queue_size>{{connection.queue_size}}</queue_size>
|
||||||
|
{% endif %}
|
||||||
</remote>
|
</remote>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
@ -102,7 +112,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
<!-- Policy monitoring -->
|
<!-- Policy monitoring -->
|
||||||
<rootcheck>
|
<rootcheck>
|
||||||
<disabled>no</disabled>
|
<disabled>no</disabled>
|
||||||
@ -297,7 +306,6 @@
|
|||||||
{% for no_diff in wazuh_manager_config.syscheck.no_diff %}
|
{% for no_diff in wazuh_manager_config.syscheck.no_diff %}
|
||||||
<nodiff>{{ no_diff }}</nodiff>
|
<nodiff>{{ no_diff }}</nodiff>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if wazuh_manager_config.syscheck.skip_nfs is defined %}
|
{% if wazuh_manager_config.syscheck.skip_nfs is defined %}
|
||||||
<skip_nfs>{{ wazuh_manager_config.syscheck.skip_nfs }}</skip_nfs>
|
<skip_nfs>{{ wazuh_manager_config.syscheck.skip_nfs }}</skip_nfs>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -320,6 +328,7 @@
|
|||||||
</global>
|
</global>
|
||||||
|
|
||||||
{% for command in wazuh_manager_config.commands %}
|
{% for command in wazuh_manager_config.commands %}
|
||||||
|
|
||||||
<command>
|
<command>
|
||||||
<name>{{ command.name }}</name>
|
<name>{{ command.name }}</name>
|
||||||
<executable>{{ command.executable }}</executable>
|
<executable>{{ command.executable }}</executable>
|
||||||
@ -351,21 +360,44 @@
|
|||||||
{% if wazuh_manager_config.authd.enable == true %}
|
{% if wazuh_manager_config.authd.enable == true %}
|
||||||
<auth>
|
<auth>
|
||||||
<disabled>no</disabled>
|
<disabled>no</disabled>
|
||||||
{% if wazuh_manager_config.authd.port is not none %}<port>{{wazuh_manager_config.authd.port}}</port>{% else %}<port>1515</port>{% endif %}
|
{% if wazuh_manager_config.authd.port is not none %}
|
||||||
{% if wazuh_manager_config.authd.use_source_ip is not none %}<use_source_ip>{{wazuh_manager_config.authd.use_source_ip}}</use_source_ip>{% endif %}
|
<port>{{wazuh_manager_config.authd.port}}</port>
|
||||||
{% if wazuh_manager_config.authd.force_insert is not none %}<force_insert>{{wazuh_manager_config.authd.force_insert}}</force_insert>{% endif %}
|
{% else %}
|
||||||
{% if wazuh_manager_config.authd.force_time is not none %}<force_time>{{wazuh_manager_config.authd.force_time}}</force_time>{% endif %}
|
<port>1515</port>
|
||||||
{% if wazuh_manager_config.authd.purge is not none %}<purge>{{wazuh_manager_config.authd.purge}}</purge>{% endif %}
|
{% endif %}
|
||||||
{% if wazuh_manager_config.authd.use_password is not none %}<use_password>{{wazuh_manager_config.authd.use_password}}</use_password>{% endif %}
|
{% if wazuh_manager_config.authd.use_source_ip is not none %}
|
||||||
{% if wazuh_manager_config.authd.ssl_agent_ca is not none %}<ssl_agent_ca>/var/ossec/etc/{{wazuh_manager_config.authd.ssl_agent_ca | basename}}</ssl_agent_ca>{% endif %}
|
<use_source_ip>{{wazuh_manager_config.authd.use_source_ip}}</use_source_ip>
|
||||||
{% if wazuh_manager_config.authd.ssl_verify_host is not none %}<ssl_verify_host>{{wazuh_manager_config.authd.ssl_verify_host}}</ssl_verify_host>{% endif %}
|
{% endif %}
|
||||||
{% if wazuh_manager_config.authd.ssl_manager_cert is not none %}<ssl_manager_cert>/var/ossec/etc/{{wazuh_manager_config.authd.ssl_manager_cert | basename}}</ssl_manager_cert>{% endif %}
|
{% if wazuh_manager_config.authd.force_insert is not none %}
|
||||||
{% if wazuh_manager_config.authd.ssl_manager_key is not none %}<ssl_manager_key>/var/ossec/etc/{{wazuh_manager_config.authd.ssl_manager_key | basename}}</ssl_manager_key>{% endif %}
|
<force_insert>{{wazuh_manager_config.authd.force_insert}}</force_insert>
|
||||||
{% if wazuh_manager_config.authd.ssl_auto_negotiate is not none %}<ssl_auto_negotiate>{{wazuh_manager_config.authd.ssl_auto_negotiate}}</ssl_auto_negotiate>{% endif %}
|
{% endif %}
|
||||||
|
{% if wazuh_manager_config.authd.force_time is not none %}
|
||||||
|
<force_time>{{wazuh_manager_config.authd.force_time}}</force_time>
|
||||||
|
{% endif %}
|
||||||
|
{% if wazuh_manager_config.authd.purge is not none %}
|
||||||
|
<purge>{{wazuh_manager_config.authd.purge}}</purge>
|
||||||
|
{% endif %}
|
||||||
|
{% if wazuh_manager_config.authd.use_password is not none %}
|
||||||
|
<use_password>{{wazuh_manager_config.authd.use_password}}</use_password>
|
||||||
|
{% endif %}
|
||||||
|
{% if wazuh_manager_config.authd.ssl_agent_ca is not none %}
|
||||||
|
<ssl_agent_ca>/var/ossec/etc/{{wazuh_manager_config.authd.ssl_agent_ca | basename}}</ssl_agent_ca>
|
||||||
|
{% endif %}
|
||||||
|
{% if wazuh_manager_config.authd.ssl_verify_host is not none %}
|
||||||
|
<ssl_verify_host>{{wazuh_manager_config.authd.ssl_verify_host}}</ssl_verify_host>
|
||||||
|
{% endif %}
|
||||||
|
{% if wazuh_manager_config.authd.ssl_manager_cert is not none %}
|
||||||
|
<ssl_manager_cert>/var/ossec/etc/{{wazuh_manager_config.authd.ssl_manager_cert | basename}}</ssl_manager_cert>
|
||||||
|
{% endif %}
|
||||||
|
{% if wazuh_manager_config.authd.ssl_manager_key is not none %}
|
||||||
|
<ssl_manager_key>/var/ossec/etc/{{wazuh_manager_config.authd.ssl_manager_key | basename}}</ssl_manager_key>
|
||||||
|
{% endif %}
|
||||||
|
{% if wazuh_manager_config.authd.ssl_auto_negotiate is not none %}
|
||||||
|
<ssl_auto_negotiate>{{wazuh_manager_config.authd.ssl_auto_negotiate}}</ssl_auto_negotiate>
|
||||||
|
{% endif %}
|
||||||
</auth>
|
</auth>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
<cluster>
|
<cluster>
|
||||||
<disabled>{{ wazuh_manager_config.cluster.disable }}</disabled>
|
<disabled>{{ wazuh_manager_config.cluster.disable }}</disabled>
|
||||||
<name>{{ wazuh_manager_config.cluster.name }}</name>
|
<name>{{ wazuh_manager_config.cluster.name }}</name>
|
||||||
@ -394,7 +426,7 @@
|
|||||||
<ignore_output>yes</ignore_output>
|
<ignore_output>yes</ignore_output>
|
||||||
<run_on_start>{{ wazuh_manager_config.vuls.run_on_start }}</run_on_start>
|
<run_on_start>{{ wazuh_manager_config.vuls.run_on_start }}</run_on_start>
|
||||||
</wodle>
|
</wodle>
|
||||||
{% endif %}
|
{% endif -%}
|
||||||
|
|
||||||
{% if agentless_creds is defined %}
|
{% if agentless_creds is defined %}
|
||||||
{% for agentless in agentless_creds %}
|
{% for agentless in agentless_creds %}
|
||||||
@ -407,11 +439,8 @@
|
|||||||
<arguments>{{ agentless.arguments }}</arguments>
|
<arguments>{{ agentless.arguments }}</arguments>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</agentless>
|
</agentless>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif -%}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% if wazuh_manager_config.active_responses is defined %}
|
{% if wazuh_manager_config.active_responses is defined %}
|
||||||
{% for response in wazuh_manager_config.active_responses %}
|
{% for response in wazuh_manager_config.active_responses %}
|
||||||
@ -427,10 +456,11 @@
|
|||||||
{%if response.repeated_offenders is defined %}<repeated_offenders>{{ response.repeated_offenders }}</repeated_offenders>{% endif %}
|
{%if response.repeated_offenders is defined %}<repeated_offenders>{{ response.repeated_offenders }}</repeated_offenders>{% endif %}
|
||||||
</active-response>
|
</active-response>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif -%}
|
||||||
|
|
||||||
<!-- Files to monitor (localfiles) -->
|
<!-- Files to monitor (localfiles) -->
|
||||||
{% for localfile in wazuh_manager_config.localfiles.common %}
|
{% for localfile in wazuh_manager_config.localfiles.common %}
|
||||||
|
|
||||||
<localfile>
|
<localfile>
|
||||||
<log_format>{{ localfile.format }}</log_format>
|
<log_format>{{ localfile.format }}</log_format>
|
||||||
{% if localfile.format == 'command' or localfile.format == 'full_command' %}
|
{% if localfile.format == 'command' or localfile.format == 'full_command' %}
|
||||||
@ -468,6 +498,7 @@
|
|||||||
|
|
||||||
{% if ansible_os_family == "Debian" %}
|
{% if ansible_os_family == "Debian" %}
|
||||||
{% for localfile in wazuh_manager_config.localfiles.debian %}
|
{% for localfile in wazuh_manager_config.localfiles.debian %}
|
||||||
|
|
||||||
<localfile>
|
<localfile>
|
||||||
<log_format>{{ localfile.format }}</log_format>
|
<log_format>{{ localfile.format }}</log_format>
|
||||||
{% if localfile.format == 'command' or localfile.format == 'full_command' %}
|
{% if localfile.format == 'command' or localfile.format == 'full_command' %}
|
||||||
@ -502,10 +533,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</localfile>
|
</localfile>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif -%}
|
||||||
|
|
||||||
{% if ansible_os_family == "RedHat" %}
|
{% if ansible_os_family == "RedHat" %}
|
||||||
{% for localfile in wazuh_manager_config.localfiles.centos %}
|
{% for localfile in wazuh_manager_config.localfiles.centos %}
|
||||||
|
|
||||||
<localfile>
|
<localfile>
|
||||||
<log_format>{{ localfile.format }}</log_format>
|
<log_format>{{ localfile.format }}</log_format>
|
||||||
{% if localfile.format == 'command' or localfile.format == 'full_command' %}
|
{% if localfile.format == 'command' or localfile.format == 'full_command' %}
|
||||||
@ -540,7 +572,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</localfile>
|
</localfile>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif -%}
|
||||||
|
|
||||||
{% if wazuh_manager_config.syslog_outputs is defined %}
|
{% if wazuh_manager_config.syslog_outputs is defined %}
|
||||||
{% for syslog_output in wazuh_manager_config.syslog_outputs %}
|
{% for syslog_output in wazuh_manager_config.syslog_outputs %}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user