$DYNAMIC_PORT$ in SSH connection (Mikrotik´s Winbox in this case)

$DYNAMIC_PORT$ in SSH connection (Mikrotik´s Winbox in this case)

avatar

Hi!

I´m trying to connect Mirkotik´s Winbox over SSH.

I´ve created this entry in RDM:

Host: mytesthost.com:$DYNAMIC_PORT$ (This variable should be passed to winbox.exe)
port: 43311 (this is the SSH´s port on wich my mikrotiks are listening in different locations)

forum image


Then I tell RDM to always connect first thru SSH

forum image


I use $HOST$ variable since there is no "inherited" option here and port 43311 since this is where the SSH should connect.
In Outgoing Tunnel Settings.

Mode: Local
Check Use Dynamic Port (This is the $DINAMIC_PORT$ variable that should be passed to winbox.exe)
Source and Destination:127.0.0.1
Destination Port: 48291 (this is the port on wich my Mirkrotiks accept Winbox´s connections)

forum image


Upon connection this doesn´t work because although it says that is connecting to 43311 (the SSH port of my Mikrotiks) the ":$DYNAMIC_PORT$" of the host is messing it up.

forum image

If in the Host I just leave "mytesthost.com", it connects

forum image


And then RDM opens Winbox but on the port of the SSH, not on the Dynamic Port because, of course, nothing is telling it to do it so since in the General Tab the port is only a number, can´t be a variable.

forum image

I´ve tried different things but I can´t get it to work...




HOWEVER, I did got it working by using an External Application entry:

forum image

The SSH connects, all the variables work and get passed to winbox.exe and it open correctly over the Dynamic Port.

This works but of course is not an elegant solution and the location of winbox.exe is fixed in every entry. Change the location of it or run the entry on another computer and it might not work.

Is it possible to accomplish what i´m trying to do with the Winbox entry? And potentially every other entry that runs an external app recognized by RDM.

All Comments (3)

avatar

Hello,

Thank you for contacting us on that matter!

I will discuss this with our Engineering Department to see if that is possible. That being said, our control over applications that are opened outside of RDM is pretty limited and I suspect that the workaround that you have found might be the only solution at this time.

Best regards,

James Lafleur

avatar

Ok to that!

But it´s not a matter of control over external apps, that works. But the option to use variables in the port of the entries.

I think the functionality is ALMOST there.

For example, in Advanced there is a "Custom host port" field that DO support variables but it´s not sent to the external app.

forum image

Maybe a new field with "Custom host port for external app"?

avatar

Hello,

Thank you for your swift reply!

I will discuss that matter with our Engineering Department and get back to you once I will have an update to provide on that matter.

Best regards,

James Lafleur