Mac os - problem connecting to remote host

Hi.

I have configured a thinlinc server in our company dmz network and through this server I am trying to connect to a remote linux server (it is a Red Hat 9 virtual machine).

When from my client (mac os with thinlinc client) I configure the session i put:

  • as server i indicate my thinlinc server in dmz
  • as username i indicate a user and a pwd that has grant to login in remote linux server

With this username and pwd I can login on remote server using thinlinc webaccess on port 300 without issues.

But if I try to use the client I obtain this error:

  • impossible to configure secure tunnel to agent (ssh terminated)

From the client I see that:

  • client shows that it connects successfully through ssh to thinlinc serverin dmz
  • then client shows that it is trying to connect to remote vsm agent of my remote linux host

After that I obtain the ssh tunnel error.

If I understand it correctly I have to:

  • open only port 22 to my thinlinc server in dmz
  • my endpoint must not have a direct connection to remote linux host (behind thinlinc server) because all the traffic is tunneled through ssh

I have also open firewall connection between thinlinc server and remote linux host.

So why I obtain ssh error if my endpoint can reach thinlinc server on port 22 without problems?

Thank you

Hello @antonio.taverna

Welcome to the forum!

  • then client shows that it is trying to connect to remote vsm agent of my remote linux host

  • my endpoint must not have a direct connection to remote linux host (behind thinlinc server) because all the traffic is tunneled through ssh

The ThinLinc client login is a two step process:

  1. It will first authenticate to ssh to your ThinLinc server, the address you input in the client dialog.
  2. It will then disconnect and reconnect to the vsmagent, which can be the same server or an entirely different server.

In your case, It sounds like you only have one server, which means that vsmagent is running on the same host as the vsmserver, but the client fails in the second process.

ThinLinc client will attempt to make an ssh connection to what is set as ‘agent_hostname’ in /opt/thinlinc/etc/conf.d/vsmagent.hconf. If nothing is specified, it will take the first primary ipaddress of the server and try to make a connection to that.

If your server is on DMZ, perhaps it is behind some sort of NAT? You need to make sure that your client can make an ssh connection to the address reported by vsmagent. Please read
Preparing the Network for ThinLinc Installation — The ThinLinc Administrator's Guide 4.14.0 build 2408 documentation for more information.

Best regards,
Martin

I forgot to add this to my reply, but try setting agent_hostname to the external facing hostname of your ThinLinc server - The one you specifiy in the ThinLinc client, and then issue a systemctl restart vsmagent

Kind regards,
Martin

Hi, thank you for the quick reply!

To clarify, I have:

  • one linux server in dmz that is the thinlinc server (vsmserver)

  • one linux server in another network that act as vsmagent

In this case I have to allow ssh connection to both servers?

Because I would prefer to allow connections only to dmz vlan and not directly to internal networks.

Thank you

Hello again,

Oh ok, thank you for the clarification.

A requirement for ThinLinc is that the client must have a direct way of communication to all the ThinLinc servers, on port 22 for native client.

Best regards,
Martin

Ok.

But to think linc servers not thinlinc agents.

I will have one thinlinc server in dmz and severals thin linc agents in production network.

Antonio

Hello @antonio.taverna

I understand. The ThinLinc client needs to be able to make an ssh connection to each, both your vsmserver and vsmagents.

See ThinLinc Architecture — The ThinLinc Administrator's Guide 4.14.0 build 2408 documentation
Furthermore, there are ports that need to be open between your vsmserver and vsmagent(s) when they are on different machines.

See On Machine Running VSM Server — The ThinLinc Administrator's Guide 4.14.0 build 2408 documentation

Kind regards,
Martin

Hi.

I have seen the documentation but I can say that ports requirements are not very clear.

Maybe it would be nice to have a sort of network diagram of various components and involved ports.

If the port 22 must be opened for both vsm server and vsm agents which is the purpose of the vsm servers in that case? I am thinking that vsm server acts as a sort of reverse proxy to secure external connections.

Because if i have severals vsm agents i would need a different external ports (on wan side) for every vsm agent, or maybe different external ips.

Thank you

Hello,

If the port 22 must be opened for both vsm server and vsm agents which is the purpose of the vsm servers in that case? I am thinking that vsm server acts as a sort of reverse proxy to secure external connections.

vsmserver enables a system administrator to run multiple ThinLinc agents in a cluster, and in that case, acts as a source of truth of which agent has which session.

Because if i have severals vsm agents i would need a different external ports (on wan side) for every vsm agent, or maybe different external ips.

You would need different public ipaddress on your firewall, and forward port 22 on each IP to a corresponding local IP port 22, on your inside zone.

In cases where this is not possible (i.e you only have one public facing IP), there is a HOST_ALIASES client setting, used together with an SSH tunnel from the client to the inside LAN can work around this.

@VirusABC wrote a blog about this here

Regards,
Martin

ok thank you for having clarified this.

so vsm server it is used to assign user grants on cluster, management of session, etc.

vdm agents are instead the hosts on which I would connect.

ok perfect, so with host_aliases I can use the same ip address (on public side) with differents ports to reach out the internal vsm agent? perfect, I will try this.

thank you

host_aliases is a parameter to configure on client side to specify on which ip:port the client can reach a single vsm agent?

so vsm server it is used to assign user grants on cluster, management of session, etc.

Yes.

vdm agents are instead the hosts on which I would connect.

The server(s) running vsmagent is where the actual session will be started and kept, i.e. your desktop environment.

ok perfect, so with host_aliases I can use the same ip address (on public side) with differents ports to reach out the internal vsm agent? perfect, I will try this.

Correct.

Regards,
Martin

1 Like

What a wonderful support.

Better then large software companies :sunglasses:

4 Likes

Thank you for the kind words, @antonio.taverna

Please don’t hesitate to open a new topic if there are any new questions!

Regards,
Martin