OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 20.1 Legacy Series »
  • Remote Logging with encryption
« previous next »
  • Print
Pages: [1]

Author Topic: Remote Logging with encryption  (Read 2720 times)

pixelschleuder

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Remote Logging with encryption
« on: March 05, 2020, 11:59:17 am »
Hello, what is the recommended way to have remote logging using syslog-ng (or syslog) with TLS encryption?

Currently the web interface does not seem to support to send log files in an encrypted way.
I would like to send logs with syslog-ng and encrypt them with TLS, preferably with mutual authentication but even only authenticating the server side would be enough.

If I would add a custom config into /usr/local/etc/syslog-ng.conf.d/<customname>.conf - would it be persistent or will it be overwritten?
Logged

siga75

  • Full Member
  • ***
  • Posts: 187
  • Karma: 11
    • View Profile
    • www.signorini.ch
Re: Remote Logging with encryption
« Reply #1 on: March 05, 2020, 02:19:01 pm »
it should persist until the next update, or you next conf modification via WUI, so you better keep a backup copy of that conf file

if syslog over tls will works (it should, gnutls is available) please let me know, I am also interested, then of course it would be cool to have it on the WUI
Logged
https://www.signorini.ch
Protectli Pfsense Mi7500L6 Intel 7Th Gen Core I7 7500U 16Gb Ddr4 Ram
512Gb Msata Ssd
6 X Intel Gigabit Ethernet

pixelschleuder

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Remote Logging with encryption
« Reply #2 on: March 05, 2020, 03:22:25 pm »
It is working fine, and its stays there after a reboot or a config change.

My config in /usr/local/etc/syslog-ng.conf.d/<custom_name>.conf for streaming all log files with mutual authentication looks like this:

Code: [Select]
destination tls_log{
        tcp("<destination>" port(<destination_port>)
        tls( ca_dir("/usr/local/etc/<path_to>/ca.d/")
            key_file("/usr/local/etc/<path_to>/key.d/client.key")
            cert_file("/usr/local/etc/<path_to>/cert.d/client.crt")
            peer_verify(required-trusted)) );
};
 
log { source(s_all); destination(tls_log); };

Of course it also would work with only authenticating the server using such a config:
Code: [Select]
destination tls_log{
        tcp("<destination>" port(<destination_port>)
        tls( ca_dir("/usr/local/etc/<path_to>/ca.d/"));
};
 
log { source(s_all); destination(tls_log); };


Logged

pixelschleuder

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Remote Logging with encryption
« Reply #3 on: March 06, 2020, 09:46:09 am »
Update: after upgrading to the new OPNsense 20.1.2 it is still there and working fine.
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 20.1 Legacy Series »
  • Remote Logging with encryption
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2