实验环境:Centos5.5 64位

服务器ip:192.168.200.2/24

客户端ip:192.168.200.3/24

一:服务端配置

1:更改/etc/sysconfig/syslog

Centos5.5下日志服务器搭建

增加 -r -x 参数

重启syslog服务

/etc/init.d/syslog restart


2:添加iptables规则

iptables -A INPUT -p udp -i eth0 -s192.168.200.3 -d 192.168.200.2 --sport 514 -j ACCEPT

允许来自客户端514端口的udp数据传到服务器上

二:客户端配置

1:更改/etc/syslog.conf文件

在文件末尾添加一行

Centos5.5下日志服务器搭建

2:添加iptables规则

允许从客户端的514端口传输udp封包到日志服务器的防火墙策略.

iptables -t filter -A INPUT -p tcp --dport  514 -j ACCEPT

3:重启syslog服务

/etc/init.d/syslog restart

三:验证

在服务器上tail -f /var/log/messages

Centos5.5下日志服务器搭建

成功!!


转载于:https://blog.51cto.com/yuanq20/1330053

相关文章:

  • 2021-06-26
  • 2021-05-17
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
  • 2021-09-20
猜你喜欢
  • 2021-11-28
  • 2022-01-16
  • 2021-08-17
  • 2021-06-20
  • 2021-08-28
  • 2021-08-24
相关资源
相似解决方案