大网数据广告活动
服务器运维问答

How to configure port access with restrictions for zabbix agent and server using firewall?

· 52CE 我爱测

I have my Agent / Server configured correctly, I know this because it was working. I just made changes to the firewall on the agent side restricting access on port 10050, but permitting the Server access like so: $ firewall-cmd -…

问题原文

原帖链接 · mcv · CC BY-SA 3.0

I have my Agent / Server configured correctly, I know this because it was working. I just made changes to the firewall on the agent side restricting access on port 10050, but permitting the Server access like so:

$ firewall-cmd --new-zone=zabbix
$ firewall-cmd --reload
$ firewall-cmd --get-zones
$ firewall-cmd --permanent --zone=zabbix --add-rich-rule='
  rule family="ipv4"
  source address="<<server_ip>>"
  port protocol="tcp" port="10050" accept'
$ firewall-cmd --reload
$ firewall-cmd --zone=zmonitor --list-all

Now there is a communication issue. The agent log is reporting the following:

 no active checks on server [<<server_ip>>:10051]: host [<<hostname>>.local] not found

The sever is reporting the following:

 cannot send list of active checks to "<<agent_ip>>": host [<<hostname>>.local] not found

Zabbix Web Server reports the following issue:

Get value from agent failed: cannot connect to [[<<Agent_IP>>]:10050]: [113] No route to host

What is wrong with --add-rich-rule?

已采纳解答

原帖链接 · Richlv · CC BY-SA 3.0

The first two errors are unrelated. They tell you that the hostname is misconfigured for active checks (and the connectivity works from the agent to the server).

The last error does not seem to be firewall related, a least judging by the error message - "No route to host". That is more likely a routing/network configuration issue.

To verify that, you can try temporarily shutting down the firewall on the agent box and telnetting from the server to the agent on port 10050.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-12-06)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。