syslog服務器
公網(wǎng)虛擬機
一、環(huán)境:Centos5.5虛擬機硬盤80G內存8G
ip:10.xxx.x.xxx
dcn:134.xx1.170.xxx
公網(wǎng):xxx.xxx.xxx.xxx
root
admin
服務器:
#vi/etc/sysconfig/syslog.conf
SYSLOGD_OPTIONS="-m0-r"
#vi/etc/syslog.conf
local6.info/var/log/XXXXXXX
$ModLoadimklog#provideskernelloggingsupport
$ModLoadimmark#provides--MARK--messagecapability
#ProvidesUDPsyslogreception
$ModLoadimudp
$UDPServerRun514
添加路徑
#arborpeakflow
local6.*/var/log/arbor_peakflow.log
添加一條iptables策略
#iptables-IINPUT-pudp-mudp--dport514-jACCEPT
永久生效
#vi/etc/init.d/iptables
-IINPUT-pudp-mudp--dport514-jACCEPT
#/etc/init.d/iptablesrestart
查看端口:
#netstat-lunp|greprsyslog
udp000.0.0.0:5140.0.0.0:*12965/rsyslogd
udp00:::514:::*12965/rsyslogd
客戶端:
#vi/etc/rsyslog.conf
local6.info@134.192.247.42
測試:
logger-plocal6.info"hello,test"
Tags:公網(wǎng)虛擬機,syslog服務器
版權聲明:本站文章來源標注為YINGSOO的內容版權均為本站所有,歡迎引用、轉載,請保持原文完整并注明來源及原文鏈接。禁止復制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務器上建立鏡像,否則將依法追究法律責任。本站部分內容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學習參考,不代表本站立場,如有內容涉嫌侵權,請聯(lián)系alex-e#qq.com處理。
關注官方微信