查看系統提供的syslog相關的函數
[root@localhost ~]# nm -D /lib/libc.so.6 | grep log
syslog.conf格式: 設備.日誌級別(= != ;) 動作
user.* /var/log/messages
*.err /var/log/err_msg
*.=warn /var/log/warn_msg
配置客戶端的log記錄到服務器中
服務端的配置: //服務器一定要把防火牆關掉
/etc/sysconfig/syslog SYSLOGD_OPTIONS="-r -m 0" // -r : remote,打開接受外來日誌消息的功能,其監控514 UDP端口;
/etc/syslog.conf user.* /var/log/dldmeg
客戶端的配置:
/etc/syslog.conf *.* @10.5.92.163
/***********************************************************************************/
// 關閉防火牆 ---iptables 3表5鏈 = (input, output, forward, )
[root@wh1007020 ~]# service iptables stop
[root@wh1007020 ~]# service iptables status
Firewall is stopped.
[root@wh1007020 ~]# setup
/usr/sbin/setenforce: SELinux is disabled
[root@wh1007020 ~]# service network restart
// 關閉防火牆 ---ufw
brian@ubuntu:~$ sudo ufw disable