Nagios Web Interface through firewall

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Andreb1972
Posts: 4
Joined: Wed May 08, 2019 7:47 pm

Nagios Web Interface through firewall

Post by Andreb1972 »

Hello,

I have installed Nagios Core 4.4.3 with HTTP on Ubuntu 18.04. The installation is in our DMZ monitoring a number of servers. The web interface works well as long as it is used from a machine in the DMZ. I have opened Port 22 and 80 so that we can monitor the environment from the internal network, so there is a firewall between my network and the Nagios server.

Issue: If I access the Web Interface from the internal machine using "http://nagiosserver/nagios", then the browser waits for some time (60s), then gives a "Connection Reset" or "Can't reach this page".

I tried to make the site a VirtualHost, and then used "http://nagiosserver/" The main page loads, but I noticed that none of the CGI scripts are able to execute. e.g. The Status Check in the middle of the page eventually returns "net::ERR_CONNECTION_RESET". If I select any of the sidebar links, none of the pages are able to load also with the same error.
To confuse the issue, I installed NagiosGraph, which also uses CGI scripts, and this appears to work fine using "http://nagiosserver/nagiosgraph"

The Ubuntu firewall has been disabled
Tried Chrome, IE and Edge
Tried different client machine
Checked Nagios file permissions
I matched the file permissions with the NagiosGraph
Followed numerous threads configuring <Directory> Require all granted </Directory>

I thought I had a firewall issue, but the Nagiosgraph cgi's wok fine, so don't think it is that, but I am not sure what else to check.

Any ideas what I can check?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Nagios Web Interface through firewall

Post by npolovenko »

Hello, @Andreb1972. Can you upload the /var/log/httpd/error_log and the Apache configuration file /etc/httpd/conf.d/nagios.conf? Are you using the same IP address to access nagios from the inside of the DMZ and from the outside?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Andreb1972
Posts: 4
Joined: Wed May 08, 2019 7:47 pm

Re: Nagios Web Interface through firewall

Post by Andreb1972 »

My Apache2 does not use httpd.conf, so I think you want the apache2.conf.

The same IP Address is used from all environments.
Attachments
nagios.conf
(2.01 KiB) Downloaded 206 times
apache2.conf
(7.06 KiB) Downloaded 198 times
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios Web Interface through firewall

Post by ssax »

More than likely this is because you didn't setup any DNS records for nagioslogserver.

From the internal machine, what does this command output?

Code: Select all

nslookup nagioslogserver
Andreb1972
Posts: 4
Joined: Wed May 08, 2019 7:47 pm

Re: Nagios Web Interface through firewall

Post by Andreb1972 »

I have no DNS records for nagioslogserver, as this is not installed. I see no reference to this in the Core documentation.
Andreb1972
Posts: 4
Joined: Wed May 08, 2019 7:47 pm

Re: Nagios Web Interface through firewall

Post by Andreb1972 »

Resolved. The IT team found a firewall rule blocking certain nagios script execution.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Nagios Web Interface through firewall

Post by npolovenko »

@Andreb1972, Glad you were able to resolve this. I will be closing this thread.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked