Hi Radu,
First with only the new syntax:
[***@logmanagement-client:/etc/rsyslog.d]# cat forward_syslog_tls.conf
#
# forward - syslog / tcp+tls
#
# testing shows that we need both the legacy and new style options
# when deleting options errors messages and even rsyslogd crashes occur
#$ActionSendStreamDriver gtls
#$ActionSendStreamDriverMode 1
#$ActionSendStreamDriverAuthMode x509/name
#$ActionSendStreamDriverPermittedPeers "logmanagement.xxx.yy"
action(
type="omfwd"
target="192.168.124.100"
port="6514"
protocol="tcp"
template="RSYSLOG_SyslogProtocol23Format"
StreamDriver="gtls"
StreamDriverMode="1"
StreamDriverAuthMode="x509/name"
StreamDriverPermittedPeers="logmanagement.xx.yy"
)
# EOF
[***@logmanagement-client:/etc/rsyslog.d]# rsyslogd -N3
rsyslogd: version 7.4.7, config validation run (level 3), master config
/etc/rsyslog.conf
Segmentation fault
[***@logmanagement-client:/etc/rsyslog.d]# systemctl restart rsyslog
Job for rsyslog.service failed. See 'systemctl status rsyslog.service' and
'journalctl -xn' for details.
[***@logmanagement-client:/etc/rsyslog.d]# tail /var/log/syslog |grep
rsyslogd
Nov 6 12:30:52 logmanagement-client kernel: traps: rsyslogd[2192] general
protection ip:7fdab462c4bd sp:7ffd52d30a50 error:0 in libc-2.17.so
[7fdab45b0000+1b6000]
Nov 6 12:31:11 logmanagement-client rsyslogd: [origin software="rsyslogd"
swVersion="7.4.7" x-pid="577" x-info="http://www.rsyslog.com"] exiting on
signal 15.
Now with only the old syntax:
[***@logmanagement-client:/etc/rsyslog.d]# cat forward_syslog_tls.conf
#
# forward - syslog / tcp+tls
#
# testing shows that we need both the legacy and new style options
# when deleting options errors messages and even rsyslogd crashes occur
$ActionSendStreamDriver gtls
$ActionSendStreamDriverMode 1
$ActionSendStreamDriverAuthMode x509/name
$ActionSendStreamDriverPermittedPeers "logmanagement.xxx.yy"
action(
type="omfwd"
target="192.168.124.100"
port="6514"
protocol="tcp"
template="RSYSLOG_SyslogProtocol23Format"
#StreamDriver="gtls"
#StreamDriverMode="1"
#StreamDriverAuthMode="x509/name"
#StreamDriverPermittedPeers="logmanagement.xxx.yy"
)
# EOF
[
***@logmanagement-client:/etc/rsyslog.d]# rsyslogd -N3
rsyslogd: version 7.4.7, config validation run (level 3), master config
/etc/rsyslog.conf
rsyslogd: invalid or yet-unknown config file command
'ActionSendStreamDriverPermittedPeers' - have you forgotten to load a
module? [try http://www.rsyslog.com/e/3003 ]
rsyslogd: End of config validation run. Bye.
[***@logmanagement-client:/etc/rsyslog.d]# systemctl restart rsyslog
[***@logmanagement-client:/etc/rsyslog.d]# tail /var/log/syslog |grep
rsyslogd
Nov 6 12:36:30 logmanagement-client rsyslogd: [origin software="rsyslogd"
swVersion="7.4.7" x-pid="2306" x-info="http://www.rsyslog.com"] start
Nov 6 12:36:30 logmanagement-client rsyslogd-3003: invalid or yet-unknown
config file command 'ActionSendStreamDriverPermittedPeers' - have you
forgotten to load a module? [try http://www.rsyslog.com/e/3003 ]
Nov 6 12:36:30 logmanagement-client rsyslogd-2088: error: peer name not
authorized - not permitted to talk to it. Names: CN: logmanagement.xxx.yy
[try http://www.rsyslog.com/e/2088 ]
Nov 6 12:36:30 logmanagement-client rsyslogd-2088: error: peer name not
authorized - not permitted to talk to it. Names: CN:
logmanagement.xxx.yy; [try http://www.rsyslog.com/e/2088 ]
With both old and new:
[***@logmanagement-client:/etc/rsyslog.d]# cat forward_syslog_tls.conf
#
# forward - syslog / tcp+tls
#
# testing shows that we need both the legacy and new style options
# when deleting options errors messages and even rsyslogd crashes occur
$ActionSendStreamDriver gtls
$ActionSendStreamDriverMode 1
$ActionSendStreamDriverAuthMode x509/name
$ActionSendStreamDriverPermittedPeers "logmanagement.xxx.yy"
action(
type="omfwd"
target="192.168.124.100"
port="6514"
protocol="tcp"
template="RSYSLOG_SyslogProtocol23Format"
StreamDriver="gtls"
StreamDriverMode="1"
StreamDriverAuthMode="x509/name"
StreamDriverPermittedPeers="logmanagement.xxx.yy"
)
# EOF
[***@logmanagement-client:/etc/rsyslog.d]# rsyslogd -N3
rsyslogd: version 7.4.7, config validation run (level 3), master config
/etc/rsyslog.conf
rsyslogd: invalid or yet-unknown config file command
'ActionSendStreamDriverPermittedPeers' - have you forgotten to load a
module? [try http://www.rsyslog.com/e/3003 ]
rsyslogd: End of config validation run. Bye.
[***@logmanagement-client:/etc/rsyslog.d]# systemctl restart rsyslog
[***@logmanagement-client:/etc/rsyslog.d]# tail /var/log/syslog
Nov 6 12:39:04 logmanagement-client rsyslogd: [origin software="rsyslogd"
swVersion="7.4.7" x-pid="2328" x-info="http://www.rsyslog.com"] start
Nov 6 12:39:04 logmanagement-client rsyslogd-3003: invalid or yet-unknown
config file command 'ActionSendStreamDriverPermittedPeers' - have you
forgotten to load a module? [try http://www.rsyslog.com/e/3003 ]
And this configuration actually does work.
For sure i'm hitting some bugs here ;)
Cheers,
Jörgen
Post by Radu GheorgheHello Jörgen,
So if you "translate" the $Action... directives into RainerScript it
doesn't work at all? And you also don't get any configuration errors?
Then it would be a bug.
Best regards,
Radu
--
Performance Monitoring * Log Analytics * Search Analytics
Solr & Elasticsearch Support * http://sematext.com/
Post by Jörgen MaasHi, thanks Radu for your feedback!
On the client and the server all rsyslog and gnutls versions are the
same.
Post by Jörgen MaasI did recreate the certs with openssl, instead of the certutil as
described
Post by Jörgen Maasin the docs.
I now have this working, it's just like yesterdays issue a case of using
new and old configuration *together* to make it work...
But doing this seems to also cause some strange issues... i can imagine
that this isn't really a well tested configuration (mixing old and new).
$ActionSendStreamDriver gtls
$ActionSendStreamDriverMode 1
$ActionSendStreamDriverAuthMode x509/name
$ActionSendStreamDriverPermittedPeers "logmanagement.xxx.yy"
action(
type="omfwd"
target="192.168.124.100"
port="6514"
protocol="tcp"
template="RSYSLOG_SyslogProtocol23Format"
StreamDriver="gtls"
StreamDriverMode="1"
StreamDriverAuthMode="x509/name"
StreamDriverPermittedPeers="logmanagement.xxx.yy"
)
Without the legacy options (including
$ActionSendStreamDriverPermittedPeers) rsyslogd wont even start.
Nov 5 10:59:49 logmanagement-client rsyslogd-3003: invalid or
yet-unknown
Post by Jörgen Maasconfig file command 'ActionSendStreamDriverPermittedPeers' - have you
forgotten to load a module? [try http://www.rsyslog.com/e/3003 ]
Nov 5 10:59:26 logmanagement-client systemd: Stopping System Logging
Service...
Nov 5 10:59:26 logmanagement-client systemd: rsyslog.service: main
process
Post by Jörgen Maasexited, code=killed, status=6/ABRT
Nov 5 10:59:26 logmanagement-client systemd: Unit rsyslog.service
entered
Post by Jörgen Maasfailed state.
Nov 5 10:59:26 logmanagement-client systemd: Starting System Logging
Service...
rsyslogd[4698]
Post by Jörgen Maasgeneral protection ip:7fd55a8584bd sp:7ffe547d5f90 error:0 in
libc-2.17.so
Post by Jörgen Maas[7fd55a7dc000+1b6000]
Nov 5 11:02:58 logmanagement-client rsyslogd-2088: error: peer name not
logmanagement.xxx.yy; [try http://www.rsyslog.com/e/2088 ]
So with this "hybrid" config i can transfer logs over the tls channel.
But
Post by Jörgen Maasunfortunately the system is not really stable, i have seen some segfaults
and the general protection errors in the above log make me a bit wary
using
Post by Jörgen Maasthis in a production setting. Any suggestions/hints on this specific
error
Post by Jörgen Maasand/or the segfaults?
Thanks again!
Regards,
Jörgen
On Thu, Nov 5, 2015 at 8:07 AM, Radu Gheorghe <
Post by Radu GheorgheHello,
We had this problem at one point when having different versions of
rsyslog (and/or gnutls) acting as client and server. Another time when
I encountered this was when I didn't set up certificates properly.
I hope this helps.
Best regards,
Radu
--
Performance Monitoring * Log Analytics * Search Analytics
Solr & Elasticsearch Support * http://sematext.com/
Post by Jörgen MaasHi all,
With yesterdays help i've succeeded in setting up a TLS listener. I
also
http://blog.sematext.com/2014/03/25/encrypting-logs-on-their-way-to-elasticsearch-part-2-tls-syslog/
Post by Jörgen MaasPost by Radu GheorghePost by Jörgen MaasNov 5 06:10:50 logmanagement rsyslogd-2083: gnutls returned error on
handshake: An unexpected TLS packet was received.
I captured the network sessions and the messages are sent with plain
tcp
Post by Jörgen MaasPost by Radu GheorghePost by Jörgen Maas(readable), so that explains the server side log entry.
action(
type="omfwd"
target="192.168.124.100"
port="6514"
protocol="tcp"
template="RSYSLOG_SyslogProtocol23Format"
StreamDriver="gtls"
StreamDriverMode="1"
StreamDriverAuthMode="x509/name"
StreamDriverPermittedPeers="logmanagement.xxx.yyy"
)
The "gtls" default settings are set in the global() section, as
discussed
Post by Jörgen MaasPost by Radu GheorghePost by Jörgen Maasyesterday.
rsyslog-7.4.7-7.el7_1.1.x86_64
What am I missing here?
Thanks!
Regards,
Jörgen
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a
myriad
Post by Jörgen MaasPost by Radu Gheorgheof sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
DON'T LIKE THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
DON'T LIKE THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
DON'T LIKE THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
DON'T LIKE THAT.
--
Grtz,
Jörgen Maas
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEA