syslog服務(wù)器
公網(wǎng)虛擬機
一、環(huán)境:Centos5.5虛擬機硬盤80G內(nèi)存8G
ip:10.xxx.x.xxx
dcn:134.xx1.170.xxx
公網(wǎng):xxx.xxx.xxx.xxx
root
admin
服務(wù)器:
#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服務(wù)器
版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。