I'm using a pfsense firewall with the Zabbix-Proxy package.
Since I'm using different independent networks (all managed by my pfsense), I thought using the proxy was a good idea.
However, I've ran into the following problem.
the hostname of my pfsense is pfsense.mydomain, and I have 3 different LAN networks: 192.168.1-3.0/24
Thus, pfsense has 3 gateways on each of these networks: 192.168.1.1, 192.168.2.1 and 192.168.3.1
with 192.168.1.1 being the main IP. When I ping pfsense.mydomain, the DNS-resolver resolves it to 192.168.1.1.
But this is a problem, since zabbix-agents that are not on 1.1 can't connect to the pfsense zabbix proxy, because of the following error message:
So, apparently, when the pfsense-proxy tries to connect to the agents of the (192.168.2.0/24 network), it uses its 192.168.2.1 address. However, the agents are expecting a connection from 192.168.1.1
How can I remedy this?
Obviously, I could just go into every agent, and change the value of Server=pfsense.mydomain too Server=192.168.1.1
But I feel like there should be a better way to handle this. I don't want to change all of my zabbix-agents again if the pfsense-IP should ever change. Can't I somehow use the same hostname on all nodes?
What's the common way people handle this sort of situation?
Since I'm using different independent networks (all managed by my pfsense), I thought using the proxy was a good idea.
However, I've ran into the following problem.
the hostname of my pfsense is pfsense.mydomain, and I have 3 different LAN networks: 192.168.1-3.0/24
Thus, pfsense has 3 gateways on each of these networks: 192.168.1.1, 192.168.2.1 and 192.168.3.1
with 192.168.1.1 being the main IP. When I ping pfsense.mydomain, the DNS-resolver resolves it to 192.168.1.1.
But this is a problem, since zabbix-agents that are not on 1.1 can't connect to the pfsense zabbix proxy, because of the following error message:
Code:
failed t accept an incoming connection: connection "192.168.2.1" rejected, allowed hosts: "pfsense.mydomain"
How can I remedy this?
Obviously, I could just go into every agent, and change the value of Server=pfsense.mydomain too Server=192.168.1.1
But I feel like there should be a better way to handle this. I don't want to change all of my zabbix-agents again if the pfsense-IP should ever change. Can't I somehow use the same hostname on all nodes?
What's the common way people handle this sort of situation?
Comment