Ufw nagios

From snippet wiki
Jump to navigation Jump to search

Adding nrpe nagios access to a running ufw user firewall:

mkdir -p /etc/ufw/applications.d
sh -c "echo '[NRPE]' > /etc/ufw/applications.d/nagios"
sh -c "echo 'title=Nagios Remote Plugin Executor' >> /etc/ufw/applications.d/nagios"
sh -c "echo 'description=Allows remote execution of Nagios plugins' >> /etc/ufw/applications.d/nagios"
sh -c "echo 'ports=5666/tcp' >> /etc/ufw/applications.d/nagios"
ufw allow NRPE
ufw allow 5666
ufw reload

That should open the nrpe/5666 port to anyone. Further restriction is then handled within nrpe_local.cfg itself.