Page 1 of 1

Can't connect on ports

Posted: Fri Jan 19, 2024 9:14 am
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 ?

Re: Can't connect on ports

Posted: Fri Jan 19, 2024 9:38 am
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