我正在嘗試在 RHEL 8 上進行 SIEM 攝取設定。
我知道問題是因為我在全域和imtcp 模組中都有gtls - 這是顯而易見的,但我找不到的是如何將此配置新增到單一輸入範本中,我可以將其新增至每個需要的規則集中。這樣還可以嗎?
我嘗試將以下內容新增到我的輸入範本中,但無濟於事。它們似乎已被棄用。
我嘗試添加:
(1)
StreamDriver.Name="gtls"
StreamDriver.Mode="1"
StreamDriver.Authmode="anon"
(2)
Tag="ssl"
(3)
tls="on"
tls.caCert="/etc/rsyslog.d/certs/CA.pem"
tls.myCert="/etc/rsyslog.d/certs/server.pem"
tls.myPrivKey="/etc/rsyslog.d/certs/Key.key"
tls.authmode="name"
任何建議將不勝感激。
########## MODULES ##########
module(load="imudp")
module(load="imtcp" MaxSessions="500"
StreamDriver.Name="gtls"
StreamDriver.Mode="1"
StreamDriver.Authmode="anon"
)
########## TEMPLATES ##########
template(name="FileFormat" type="list") {
property(name="rawmsg-after-pri")
constant(value="\n")
}
# make gtls driver the default and set certificate files
global(
DefaultNetstreamDriver="gtls"
DefaultNetstreamDriverCAFile="/etc/rsyslog.d/certs/CA.pem"
DefaultNetstreamDriverCertFile="/etc/rsyslog.d/certs/server.pem"
DefaultNetstreamDriverKeyFile="/etc/rsyslog.d/certs/Key.key"
)
# semanage port -a -t syslogd_port_t -p udp <port>
############### udp_input ###############
input(type="imudp" port="8501" ruleset="udp_input")
template(name="udp_input" type="string" string="var/log/remote/udp_input/%HOSTNAME%/%$day%_%$hour%.log")
ruleset(name="udp_input"){
action(
type="omfile"
dirCreateMode="0755"
template="FileFormat"
dynafile="udp_input"
)
}
# semanage port -a -t syslogd_port_t -p tcp <port>
############### TCP_input ###############
input(type="imtcp" port="8502" ruleset="TCP_input")
template(name="TCP_input" type="string" string="var/log/remote/TCP_input/%HOSTNAME%/%$day%_%$hour%.log")
ruleset(name="TCP_input"){
action(
type="omfile"
dirCreateMode="0755"
template="FileFormat"
dynafile="TCP_input"
)
}
# semanage port -a -t syslog_tls_port_t -p tcp <port>
############### tls_input ###############
input(type="imtcp" port="8611" ruleset="tls_input")
template(name="tls_input" type="string" string="var/log/remote/tls_input/%HOSTNAME%/%$day%_%$hour%.log")
ruleset(name="tls_input"){
action(
type="omfile"
dirCreateMode="0755"
template="FileFormat"
dynafile="tls_input"
)
}
我有模組: rsyslog.x86_64
rsyslog-gnutls.x86_64 rsyslog-gssapi.x86_64 rsyslog-relp.x86_64
答案1
您是否也嘗試過透過純文字 TCP imptcp 取代 imtcp 模組?
############### TCP_input ###############
input(type="imptcp" port="8502" ruleset="TCP_input")