Pandora FMS Community

Tentacle server and ssl

yggdrasild · 25 jun 2013, 0:18 · 5 mensajes · 58 visitas

  1. Inicio del debate

    I have installed a Pandora server on an Ubuntu 12.04. I would like the connections between agent and server to be encrypted, since a few connections will run over internet. One agent have been configured with ssh, which is one solution. After reading that tentacle is the default communication server/method I tried setting up tentacle on another agent, but I cannot make it work with ssl. I must admit that ssl is not my strongest area, so there are some blanks. Here's one go: On the tentacle server I did the following: # make selfcert with openssl req -new -x509 -keyout tentaclekey.pem -out tentaclecert.pem -days 360 # start tentacle server manually: tentacle_server -a 0.0.0.0 -p 41121 -s /var/spool/pandora/data_in -e tentaclecert.pem -k tentaclekey.pem -v On the agent I started the client manually: tentacle_client -a 192.168.1.235 -c -v  /bin/bash With the client reporting: [log] Connected to 192.168.1.235 port 41121 [err] SSL connect attempt failed with unknown errorerror:00000000:lib(0):func(0):reason(0) And the server reporting: [log] Server listening on 0.0.0.0 port 41121 (press to stop) [log] Client connected from 192.168.1.235 [err] Failed to open Private Keyerror:0907B068:PEM routines:PEM_READ_BIO_PRIVATEKEY:bad password read Stopped server and restarted with: tentacle_server -a 0.0.0.0 -p 41121 -s /var/spool/pandora/data_in -e tentaclecert.pem -k tentaclekey.pem -v -w Same client command gave: [log] Server listening on 0.0.0.0 port 41121 (press to stop) [log] Client connected from 192.168.1.235 Bad arg length for Socket6::unpack_sockaddr_in6, length is 16, should be 28 at /usr/lib/perl5/Socket6.pm line 282, line 2. And the client reporting the following error: [log] Connected to 192.168.1.235 port 41121 [log] Request to send file 'bash' size 959120b [err] Read error from 192.168.1.233: Forbindelsen brutt i den andre enden. Any ideas on where I stumble is much appreciated. Johnny

  2. Hello It's important to run tentacle_client with certificates too. tentacle_client -a 192.168.1.235 -e tentaclecert.pem -k tentaclekey.pem -v /bin/bash Regards

  3. Hi Mario. Thanks for the advice, but I still cannot make it work. I started by copying the tentaclecert.pem and tentaclekey.pem to the client. #1 @ server tentacle_server -a 0.0.0.0 -p 41121 -s /var/spool/pandora/data_in -e tentaclecert.pem -k tentaclekey.pem  -v [log] Server listening on 0.0.0.0 port 41121 (press to stop) [log] Client connected from 192.168.1.235 [err] Failed to open Private Keyerror:0907B068:PEM routines:PEM_READ_BIO_PRIVATEKEY:bad password read #1 @ client, with same tentaclecert.pem and tentaclekey.pem tentacle_client -a 192.168.1.235 -e tentaclecert.pem -k tentaclekey.pem -v /bin/bash [log] Connected to 192.168.1.235 port 41121 [err] Failed to open Private Keyerror:0907B068:PEM routines:PEM_READ_BIO_PRIVATEKEY:bad password read Given this response I tried to add the -w argument and manually enter the certificate password. #2 @ server tentacle_server -a 0.0.0.0 -p 41121 -s /var/spool/pandora/data_in -e tentaclecert.pem -k tentaclekey.pem  -v -w Enter private key file password: Enter private key file password again for confirmation: [log] Server listening on 0.0.0.0 port 41121 (press to stop) [log] Client connected from 192.168.1.235 [err] SSL accept attempt failed with unknown errorerror:140890B2:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:no certificate returned #2 @ client tentacle_client -a 192.168.1.235 -e tentaclecert.pem -k tentaclekey.pem -v -w  /bin/bash Enter private key file password: Enter private key file password again for confirmation: [log] Connected to 192.168.1.235 port 41121 [err] SSL connect attempt failed because of handshake problemserror:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca Does this make any sense at all? Have you seen a step by step example? Johnny

  4. OK, starting to close in on the problem. Have installed on another computer (actually 2) and started the tentacle_server only and was able to circle in on a configuration that works. With the same parameters, the intended/problematc server gives this error: Bad arg length for Socket6::unpack_sockaddr_in6, length is 16, should be 28 at /usr/lib/perl5/Socket6.pm line 282, line 2. Searching for this string points to ipv6, but afaik it is not installed (even though the problemserver(s)) have an ipv6 address. The computer where it works is running Ubuntu 13.04 on the metal, and with no sign of ipv6. Another difference is that the 13.04 is a workstation/laptop with dynamic address, while the VM's have static IP. The problem machines are Ubuntu 12.04 LTS server VM's running in VirtualBox. I really do not want to run on metal, so any ideas would be great.

  5. Have you installed the perl module "IO::Socket::INET6"?

Entra en tu cuenta para publicar.