mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 10:35:27 +00:00
System: Settings: Logging / targets - simplify tls handling and handle rfc5424 consistently. closes https://github.com/opnsense/core/issues/6813
This commit is contained in:
parent
73b6e048ac
commit
8a8b6ff2d6
@ -22,7 +22,7 @@ filter f_{{dest_key}}_{{key}} {
|
||||
{% endfor %}
|
||||
|
||||
destination d_{{dest_key}} {
|
||||
{% if destination.transport in ['udp4', 'udp6', 'tcp4', 'tcp6'] %}
|
||||
{% if destination.transport in ['udp4', 'udp6', 'tcp4', 'tcp6', 'tls4', 'tls6'] %}
|
||||
network(
|
||||
"{{destination.hostname}}"
|
||||
transport("{{destination.transport[:3]}}")
|
||||
@ -32,19 +32,13 @@ destination d_{{dest_key}} {
|
||||
flags(syslog-protocol)
|
||||
{% endif %}
|
||||
persist-name("{{dest_key}}")
|
||||
);
|
||||
{% elif destination.transport in ['tls4', 'tls6'] %}
|
||||
network(
|
||||
"{{destination.hostname}}"
|
||||
transport("tls")
|
||||
port({{destination.port}})
|
||||
ip-protocol({{destination.transport[3]}})
|
||||
persist-name("{{dest_key}}")
|
||||
{% if destination.transport in ['tls4', 'tls6'] %}
|
||||
tls(
|
||||
ca-file("/etc/ssl/cert.pem")
|
||||
key-file("/usr/local/etc/syslog-ng/cert.d/{{dest_key}}.key")
|
||||
cert-file("/usr/local/etc/syslog-ng/cert.d/{{dest_key}}.crt")
|
||||
)
|
||||
{% endif %}
|
||||
);
|
||||
{% endif %}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user