NagiosQL proxy access behind firewal

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.
Post Reply
jonatwork
Posts: 1
Joined: Fri Oct 20, 2023 3:51 pm

NagiosQL proxy access behind firewal

Post by jonatwork »

HI Team,
We are running NagiosQL behind a firewall. To reach the UI we were required to access vial a proxy server that rewrites the URL to the server hosting our NagiosQL. So the the connection is as follows.
From laptop we hit https://proxy.server.com/sec-nagiosql/
The proxy server rewrites the URL to: https://nagios.server.com/sec-nagiosql/ # which is behind the firewall.

To make this work, we changed the location of the Nagios UI from:
/var/www/html/nagiosql to /var/www/html/sec-naiosql

This works, almost. The problem we ran into was as follows:
- The user goes to 'https://proxy.server.com/sec-nagiosql/ and is provided the login screen. This works fine.
- The user enters username/password and clicks to login.
- NagiosQA completes the logging successfully, but then redirects the user to:
https://nagois.server.com/sec-nagiosql/admin.php, which is behind the firewall and not accessible to the user,
instead of https://proxy.server.com/sec-nagiosql/admin.php
The interesting thing is, once the user is logged in and sent to
https://nagios.server.com/sec-nagiosql/admin.php
We can manually change the URL to
https://proxy.server.com/sec-nagiosql/admin.php
And everything works fine.
Is there a way that the redirect after login is sent to the proxy instead of the Nagios localhost URL?
We have been going through the code with no luck.
The interesting think is, we able to configure the Nagios Core URL to work with the proxy server with no issues.
Thanks much!
User avatar
danderson
Posts: 111
Joined: Wed Aug 09, 2023 10:05 am

Re: NagiosQL proxy access behind firewal

Post by danderson »

NagiosQL is not supported or maintained by Nagios so my knowledge on the subject is limited. You could try adding a DNS entry to make nagios.server.com go to proxy.server.com or any other similar solution. As for interacting directly in NagiosQL, I am not sure.
Post Reply