Adds Firewall rules for nagios nrpe access.

Allows connection to the nagios nrpe service
only from the nagios host.

This patch is for nagios nrpe only, rules for
the other services are being developed since the
bug addresses the entire openstack installation.

Fixes (partially): rhbz#1002063

Change-Id: Idee7d4308c3d7c6d32674920d4aadb382547927b
This commit is contained in:
Ivan Chavero
2013-10-24 16:11:59 -06:00
parent 6e848ec649
commit dad0591496
2 changed files with 6 additions and 5 deletions

View File

@@ -172,6 +172,11 @@ def createnrpemanifests(config):
controller.CONF['CONFIG_NRPE_HOST'] = hostname
manifestfile = "%s_nagios_nrpe.pp" % hostname
manifestdata = getManifestTemplate("nagios_nrpe.pp")
#Only the Nagios host is allowed to talk to nrpe
config['FIREWALL_ALLOWED'] = "'%s'" % config['CONFIG_NAGIOS_HOST']
config['FIREWALL_SERVICE_NAME'] = "nagios-nrpe"
config['FIREWALL_PORTS'] = '5666'
manifestdata += getManifestTemplate("firewall.pp")
appendManifestFile(manifestfile, manifestdata)
controller.MESSAGES.append("To use Nagios, browse to http://%s/nagios "

View File

@@ -34,8 +34,4 @@ service{'nrpe':
hasstatus => true,
}
firewall { '001 nrpe incoming':
proto => 'tcp',
dport => ['5666'],
action => 'accept',
}