Nagios and VPN

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Nginyra
Posts: 1
Joined: Mon May 06, 2019 8:46 am
Location: Clifton, NJ

Nagios and VPN

Post by Nginyra »

My apologies if I posted a wrong section. But I think it's most suited here since I'm running a Ubuntu 18.04 server. If someone says it's more suited in another section please say so and I'll be happy to redo it over there.

The question itself doesn't have that much to do with the server but more with the host it's monitoring.

So, running Nagios is all good and well when it's monitoring hosts on the local network.
Thing is, when I want to log hosts from another private network (customers). I need to set up a vpn (done), add the nagios host to the allowed hosts section in NSC.ini (I'm using NSClient++). At this point I can do basic checks like ping.

Now, when I try to use an nrpe plugin. I get an error message in my nsc.log about unauthorized acces from xxx.xxx.xxx.xxx

xxx.xxx.xxx.xxx being an ip from the local network (the customer). So I added the ip from the logs to the allowed hosts in NSC.ini and now I'm getting the desired responses on my nagios interface.

Now my question is this.
Is there a way to make this go a little more automated? Because I can imagine that when the vpn goes down, the ip changes too? Setting me back to the point where I couldn't monitor nrpe services.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios and VPN

Post by scottwilkerson »

This all sounds correct, the only thing I would suggest would be to have a static IP assigned to the VPN so it wouldn't change.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked