Linux

核心日誌被禁用?

  • October 17, 2012
uname -a
Linux host 2.6.32-279.9.1.el6.i686 #1 SMP Tue Sep 25 20:26:47 UTC 2012 i686 i686 i386 GNU/Linux

和啟動:

ls /etc/init.d/
   abrt-ccpp  certmonger  dovecot    irqbalance    matahari-broker             mdmonitor   nfs          proftpd      rpcbind     single     ypbind
   abrtd      cgconfig    functions  kdump         matahari-host               messagebus  nfslock      psacct       rpcgssd     smartd
   abrt-oops  cgred       haldaemon  killall       matahari-network            mysqld      ntpd         qpidd        rpcidmapd   sshd
   acpid      cpuspeed    halt       ktune         matahari-rpc                named       ntpdate      quota_nld    rpcsvcgssd  sssd
   atd        crond       httpd      lfd           ma

tahari-service            netconsole  oddjobd      rdisc        rsyslog     sysstat
auditd     csf         ip6tables  lvm2-lvmetad  matahari-sysconfig          netfs       portreserve  restorecond  sandbox     tuned
autofs     cups        iptables   lvm2-monitor  matahari-sysconfig-console  network     postfix      rngd         saslauthd   udev-post

但是當我安裝 CSF/LFD 時,我什麼也沒得到。LFD 不會創建 lfd.log,也不會從防火牆記錄到 /var/log/messages 中的任何塊。這不自然。

我尋找 klogd 但也許我在錯誤的地方尋找它以查看它是否已啟用?

ls /etc/init.d/syslog
ls: cannot access /etc/init.d/syslog: No such file or directory

還注意到沒有系統日誌?

也注意到了這一點:

csf -d 84.113.21.201
Adding 84.113.21.201 to csf.deny and iptables DROP...
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.

我以前從未見過這個,這是一個專用的盒子。

還:

./csftest.pl
Testing ip_tables/iptable_filter...OK
Testing ipt_LOG...OK
Testing ipt_multiport/xt_multiport...OK
Testing ipt_REJECT...OK
Testing ipt_state/xt_state...OK
Testing ipt_limit/xt_limit...OK
Testing ipt_recent...OK
Testing xt_connlimit...OK
Testing ipt_owner/xt_owner...OK
Testing iptable_nat/ipt_REDIRECT...OK
Testing iptable_nat/ipt_DNAT...OK

RESULT: csf should function on this server

iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

您可以/etc/init.d/rsyslog查看/etc/rsyslog.conf哪些過濾器可能適用以及哪些目標日誌文件用於核心消息。

引用自:https://serverfault.com/questions/439388