rsyslog:未授权对等名称 - 不允许与之交谈

raj*_*jee 5 ssl rsyslog

尝试在 TLS 开启的情况下配置 rsyslog 中央服务器。到目前为止,这是一场斗争,但我快到了。目前收到此错误:

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 ]
Run Code Online (Sandbox Code Playgroud)

但我特意将该 IP 放入InputTCPServerStreamDriverPermittedPeer. 可能有什么问题?我无法克服这个错误。验证我的配置没问题

# rsyslogd -N1
rsyslogd: version 8.27.0, config validation run (level 1), master config /etc/rsyslog.conf
rsyslogd: End of config validation run. Bye.
Run Code Online (Sandbox Code Playgroud)

我的配置去掉了一些东西:

$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
Run Code Online (Sandbox Code Playgroud)

raj*_*jee 4

事实证明,客户端提供了不受信任的证书。

解决这个问题的步骤:

  1. 在客户端上,运行: openssl s_client -connect :10514 并修复任何错误

  2. 在服务器上,运行: openssl s_client -connect :10514

  3. 在 rsyslogd.conf 中,将 $InputTCPServerStreamDriverAuthMode x509/name 切换为 $InputTCPServerStreamDriverAuthMode ,允许任何客户端在无需授权客户端的情况下进行连接。这应该允许提交事件。

这将范围缩小到客户端证书问题。