Add a special case for the zabbix agent.

This commit is contained in:
Andrea Dell'Amico 2020-04-19 20:00:44 +02:00
parent a5632f404f
commit ecb8cabd4d
1 changed files with 10 additions and 0 deletions

View File

@ -175,6 +175,16 @@
{% endif %}
{% endif %}
{% endif %}
{% if zabbix_agent_install is defined and zabbix_agent_install %}
{% if zabbix_agent_passive_checks_status == "enabled" %}
# Zabbix servers that can send passive checks
{% for ip in zabbix_monitoring_servers %}
-A INPUT -m state --state NEW -s {{ ip }} -p tcp -m tcp --dport {{ zabbix_agent_tcp_port }} -j ACCEPT
{% endfor %}
-A INPUT -m state --state NEW -p tcp -m tcp --dport {{ zabbix_agent_tcp_port }} -j REJECT --reject-with icmp-host-prohibited
{% endif %}
{% endif %}
{% if configure_munin is defined %}
{% if configure_munin %}
{% if munin_server %}