NRPE allowed_hosts woes with IPv6 on RHEL/CentOS 6
Posted: Mon Oct 26, 2015 9:47 am
A fully IPv6 dual stack enabled network is monitored by Nagios 3.5.1 installed from EPEL on a CentOS 6.7 server. Monitored hosts run NRPE agents, all of which are configured to run as daemons (not via xinetd) with the configuration line
where bombur.example.com is the Nagios server's FQDN which resolves in DNS to both the IPv4 and IPv6 addresses:
This works fine for hosts running NRPE releases before 2.15 which lack IPv6 support and ony accept IPv4 connections.
But EPEL recently updated NRPE to release 2.15 which adds IPv6 support.
On all the hosts that got updated to NRPE 2.15, connections from the Nagios server are now rejected with the log message:
IOW the allowed_hosts=<hostname> directive allows only the IPv4 address of the given host, not its IPv6 address.
Mother Google found a report on NRPE supporting only one IP address per hostname.
I tried to work around this problem by creating two separate hostnames bombur-v4 and bombur-v6 each resolving to only one address, and changing the allowed_hosts directive to:
Regrettably that does not work either. NRPE now logs:
even though bombur-v6.example.com is verified to resolve to 2001:db8:f00:ba8::28.
Bug? Known problem? By design? Feature?
Code: Select all
allowed_hosts=bombur.example.com
Code: Select all
% host bombur
bombur.example.com has address 192.0.2.28
bombur.example.com has IPv6 address 2001:db8:f00:ba8::28
But EPEL recently updated NRPE to release 2.15 which adds IPv6 support.
On all the hosts that got updated to NRPE 2.15, connections from the Nagios server are now rejected with the log message:
Code: Select all
nrpe[21665]: Host 2001:db8:f00:ba8::28 is not allowed to talk to us!
Mother Google found a report on NRPE supporting only one IP address per hostname.
I tried to work around this problem by creating two separate hostnames bombur-v4 and bombur-v6 each resolving to only one address, and changing the allowed_hosts directive to:
Code: Select all
allowed_hosts=bombur-v4.example.com,bombur-v6.example.com
Code: Select all
Allowing connections from: bombur-v4.example.com,bombur-v6.example.com
2001:db8:f00:ba8::28 is not allowed to talk to us!
Bug? Known problem? By design? Feature?