Page 1 of 1

Nagios Web Interface through firewall

Posted: Mon May 13, 2019 5:52 pm
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?

Re: Nagios Web Interface through firewall

Posted: Tue May 14, 2019 4:11 pm
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?

Re: Nagios Web Interface through firewall

Posted: Tue May 14, 2019 7:05 pm
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.

Re: Nagios Web Interface through firewall

Posted: Wed May 15, 2019 3:59 pm
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

Re: Nagios Web Interface through firewall

Posted: Wed May 15, 2019 9:14 pm
by Andreb1972
I have no DNS records for nagioslogserver, as this is not installed. I see no reference to this in the Core documentation.

Re: Nagios Web Interface through firewall

Posted: Thu May 16, 2019 4:03 pm
by Andreb1972
Resolved. The IT team found a firewall rule blocking certain nagios script execution.

Re: Nagios Web Interface through firewall

Posted: Thu May 16, 2019 4:40 pm
by npolovenko
@Andreb1972, Glad you were able to resolve this. I will be closing this thread.