Can't connect on ports

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
AlbanCalvo
Posts: 1
Joined: Fri Jan 19, 2024 8:54 am

Can't connect on ports

Post by AlbanCalvo »

Hello everyone !

I have a nagios core 4.4.5 that run on an ubuntu machine. Let's call this one NAGIOS. This machine have a public ip address. I want to monitor a pfSense router that i will cal pfSense. pfSense have a private ip. So i have to create a ssh tunnel from pfSense to Nagios. On Nagios, i created a define host register.
define host{
use linux-box
host_name router-test
alias Router Test
address localhost
_port 6000
}

So with the ssh tunnel i forward the traffic that comes to Nagios:6000 to pfSense:5666.
The tunnel is created on pfSense because of the problem of ip subnets. The command look like this:
ssh -i .ssh/id_rsa -L 5666:localhost:6000 ubuntu@[NagiosIP] -N -f

The fact is that i have this error on Nagios:
(No output on stdout) stderr: connect to address 127.0.0.1 port 6000: Connection refused


Can someone help me to resolve this problem ?
User avatar
lgute
Posts: 117
Joined: Mon Apr 06, 2020 2:49 pm

Re: Can't connect on ports

Post by lgute »

Hi @AlbanCalvo, thanks for reaching out.

This is an older post, but maybe it can help.
viewtopic.php?p=279958&hilit=pfSense#p279958
Please let us know if you have any other questions or concerns.

-Laura
Post Reply