尝试使用TLS打开configurationrsyslog中央服务器。 这是迄今为止的一场斗争,但我几乎在那里。 目前得到这个错误:
rsyslogd: error: peer name not authorized - not permitted to talk to it. Names: [v8.27.0 try http://www.rsyslog.com/e/2088 ] rsyslogd: netstream session 0x7fda34010110 from 10.0.4.91 will be closed due to error [v8.27.0 try http://www.rsyslog.com/e/2089 ]
但是我专门把这个IP放入InputTCPServerStreamDriverPermittedPeer 。 什么可能是错的? 我无法过去这个错误。 validation我的configuration是可以的
# rsyslogd -N1 rsyslogd: version 8.27.0, config validation run (level 1), master config /etc/rsyslog.conf rsyslogd: End of config validation run. Bye.
我configuration了几件事情:
$ModLoad imuxsock # local messages $ModLoad imtcp # TCP listener $ModLoad imjournal # provides access to the systemd journal $DefaultNetstreamDriver gtls $DefaultNetstreamDriverCAFile /etc/rsyslog.d/ca.pem $DefaultNetstreamDriverCertFile /etc/rsyslog.d/machine-cert.pem $DefaultNetstreamDriverKeyFile /etc/rsyslog.d/machine-key.pem $InputTCPServerStreamDriverAuthMode x509/name $InputTCPServerStreamDriverPermittedPeer 10.0.4.91 $InputTCPServerStreamDriverMode 1 #run driver in TLS-only mode $InputTCPServerRun 10514 #start up listener at port 10514 # Include all config files in /etc/rsyslog.d/ $IncludeConfig /etc/rsyslog.d/*.conf *.info;mail.none;authpriv.none;cron.none /var/log/messages
事实certificate,客户提供了一个不受信任的证书。
解决这个问题的步骤是:
在客户端上,运行:openssl s_client -connect:10514并修复任何错误
在服务器上运行:openssl s_client -connect:10514
在rsyslogd.conf中,将$ InputTCPServerStreamDriverAuthMode x509 / name改为$ InputTCPServerStreamDriverAuthMode anon,允许任何客户端连接而无需授权客户端。 这应该允许事件提交。
这缩小到客户端证书问题。