Reference:
環境:
CentOS Linux release 7.9.2009 (Core) / Rocky Linux 9.1 (不同的部分用藍色)
Software Selection: Server with GUI
防火牆修改:
firewall-cmd --zone=public --permanent --add-service=syslog
firewall-cmd --reload
/etc/rsyslog.conf 設定:
# Provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514
# Provides UDP syslog reception
# for parameters see http://www.rsyslog.com/doc/imudp.html
module(load="imudp") # needs to be done just once
input(type="imudp" port="514")
執行 systemctl restart rsyslog