Linux distributions
TMA-ALINUX2-4.2.1.4
Ensure rsyslog is configured to send logs to a remote log host
Trung bìnhCấp 1Tự độnglinux
Mô tả
The rsyslog utility supports the ability to send logs it gathers to a remote log host running syslogd(8) or to receive messages from remote hosts, reducing administrative overhead.
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
shell
alt0() { command -v grep >/dev/null 2>&1 || { echo "step1: grep not installed"; return 1; }; o=$(bash -c 'grep "^*.*[^I][^I]*@" /etc/rsyslog.conf /etc/rsyslog.d/*.conf' 2>&1); printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- '*.* @@loghost.example.com' || { echo step1: missing '*.* @@loghost.example.com'; return 1; }; }; if alt0; then echo compliant; fi- Đầu ra mong đợi
compliant
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and add the following line (where loghost.example.com is the name of your central log host). *.* @@loghost.example.com Run the following command to reload the rsyslogd configuration: # pkill -HUP rsyslogd
Thuộc tính
- Hệ điều hành
- alinux-2
- Thẻ
- cis-convertedlinux
- Tham chiếu
- CIS Aliyun Linux 2 Benchmark v1.0.0 ARCHIVE - 4.2.1.4
Kiểm tra máy này
Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.
shell
tmaegis scan --target linux