美文网首页
Rsyslog添加多端口监听

Rsyslog添加多端口监听

作者: Splunker | 来源:发表于2020-05-13 21:47 被阅读0次
需求:

在rsyslog服务上添加多端口监听(默认为514)

环境:
Red Hat Enterprise Linux Server release 7.2
操作:

编辑rsyslog配置文件

vi /etc/rsyslog.conf

前提条件:selinux未开启

添加一行1514端口监听记录

$UDPServerRun 1514

前提条件:selinux开启

1、添加一行1514端口监听记录

$UDPServerRun 1514

2、查看selinux默认支持的rsyslog udp接收端口

semanage port -l | grep syslog

3、若默认selinux不支持自定义接收端口,则进行添加

semanage port -a -t syslogd_port_t -p tcp 1514

重启启动

systemctl restart rsyslog

相关文章

网友评论

      本文标题:Rsyslog添加多端口监听

      本文链接:https://www.haomeiwen.com/subject/dwfanhtx.html