Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:documentation:08_technical_reference:09_tentacle [2021/04/30 15:42] admscopia |
en:documentation:08_technical_reference:09_tentacle [2023/05/16 08:31] (current) |
||
---|---|---|---|
Line 5: | Line 5: | ||
- | ====== About Tentacle | + | ===== About Tentacle ===== |
- | Tentacle is a client/ | + | |
+ | {{ : | ||
+ | |||
+ | **Tentacle** is a [[https:// | ||
* Safe by design. | * Safe by design. | ||
Line 12: | Line 15: | ||
* Versatile and cross-platform. | * Versatile and cross-platform. | ||
- | Tentacle was created to replace more complex tools like SCP and FTP for simple file transfer/ | + | **Tentacle** |
- | The client and server are designed to be run from the command line or called from a shellscript. Since [[https:// | + | The client and server are designed to be run from the command line or called from a shellscript. Since [[https:// |
- | Tentacle is implemented in Perl and ANSI C (Windows | + | Tentacle is implemented in [[https:// |
You can download it and find more information at the [[http:// | You can download it and find more information at the [[http:// | ||
- | ====== | + | Quick access: |
- | * [[Pandora:Documentation_en: | + | |
- | * [[Pandora:Documentation_en:Tentacle:WindowsGuide|**Tentacle | + | * [[: |
- | | + | * [[: |
- | * [[Pandora:Documentation_en:Tentacle:OpenSSLCertificates|**OpenSSL Certificates Quick Guide**]] | + | * [[: |
- | * [[en:quickguides:secure_communication_with_tentacle|**Secure | + | * [[: |
- | * [[Pandora:Documentation_en:Tentacle:CrossCompoling|**Cross-compiling | + | * [[: |
+ | |||
+ | |||
+ | ===== Tentacle User Guide ===== | ||
+ | |||
+ | ==== Installing the PERL version | ||
+ | |||
+ | === Installing from Source Forge Net === | ||
+ | |||
+ | To install Tentacle server you must have rights equivalent to **root** user, after having installed it you may run it as a standard user. | ||
+ | |||
+ | <WRAP center round download 90%> | ||
+ | |||
+ | Get the file '' | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | For example (you must have **wget** installed): | ||
+ | < | ||
+ | |||
+ | wget https:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | **Installing on Rocky Linux 8** | ||
+ | |||
+ | * Unzip the downloaded file with '' | ||
+ | * Install the Perl language with '' | ||
+ | * Enter the directory with '' | ||
+ | * Install with '' | ||
+ | |||
+ | **Installing on CentOS 7** | ||
+ | |||
+ | * Unzip the downloaded file with '' | ||
+ | * Install the Perl language '' | ||
+ | * Enter the directory with '' | ||
+ | * Install with '' | ||
+ | |||
+ | |||
+ | === Installing from SVN === | ||
+ | |||
+ | The process consists on downloading the source code through [[https:// | ||
+ | |||
+ | To install | ||
+ | < | ||
+ | |||
+ | $ svn co http:// | ||
+ | $ cd tentacle | ||
+ | $ perl Makefile.PL | ||
+ | $ make | ||
+ | # make install | ||
+ | |||
+ | </ | ||
+ | |||
+ | To install just the client, run: | ||
+ | |||
+ | < | ||
+ | $ svn co http:// | ||
+ | $ cd client | ||
+ | $ perl Makefile.PL | ||
+ | $ make | ||
+ | # make install | ||
+ | |||
+ | </ | ||
+ | |||
+ | To install just the server, run: | ||
+ | |||
+ | < | ||
+ | $ svn co http:// | ||
+ | $ cd server | ||
+ | $ perl Makefile.PL | ||
+ | $ make | ||
+ | # make install | ||
+ | |||
+ | </ | ||
+ | |||
+ | If you want to install to a custom location, replace: | ||
+ | |||
+ | < | ||
+ | $ perl Makefile.PL | ||
+ | |||
+ | </ | ||
+ | |||
+ | by: | ||
+ | |||
+ | < | ||
+ | $ perl Makefile.PL PREFIX=/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | === Manual Installation === | ||
+ | |||
+ | If **make** is not available in your system, you can manually copy the files '' | ||
+ | |||
+ | In this case, if the Perl binary is not located at ''/ | ||
+ | < | ||
+ | # | ||
+ | |||
+ | </ | ||
+ | ==== Installing the C version ==== | ||
+ | |||
+ | === Installing from SVN === | ||
+ | |||
+ | Bearing in mind the prior section, to install the Tentacle client, run: | ||
+ | |||
+ | < | ||
+ | $ svn co http:// | ||
+ | $ cd tentacle | ||
+ | $ ./ | ||
+ | $ make | ||
+ | # make install | ||
+ | |||
+ | </ | ||
+ | |||
+ | Make sure to check the configure output for errors, missing headers etc. | ||
+ | |||
+ | To disable OpenSSL support, enabled by default, replace: | ||
+ | |||
+ | < | ||
+ | $ ./ | ||
+ | |||
+ | </ | ||
+ | |||
+ | by: | ||
+ | |||
+ | < | ||
+ | $ ./configure –disable-ssl | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Tentacle use examples ==== | ||
+ | |||
+ | To see the available options, execute '' | ||
+ | < | ||
+ | $ tentacle_client -h | ||
+ | Usage: tentacle_client | ||
+ | |||
+ | Tentacle client v0.4.0. | ||
+ | |||
+ | Options: | ||
+ | -a address | ||
+ | -b localaddress Local address to bind. | ||
+ | | ||
+ | -e cert | ||
+ | -f ca | ||
+ | | ||
+ | | ||
+ | -k key OpenSSL private key file. | ||
+ | -p port | ||
+ | | ||
+ | -r number | ||
+ | -t time | ||
+ | | ||
+ | | ||
+ | -x pwd Server password. | ||
+ | -y proxy Proxy server string (user:[email protected]: | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | $ tentacle_server -h | ||
+ | Usage: / | ||
+ | |||
+ | Tentacle | ||
+ | |||
+ | Options: | ||
+ | -a ip_addresses IP addresses to listen on (default 0, | ||
+ | (Multiple addresses separated by comma can be defined.) | ||
+ | -c number | ||
+ | -d Run as daemon. | ||
+ | -e cert | ||
+ | -f ca_cert | ||
+ | -F config_file | ||
+ | -h Show help. | ||
+ | -I Enable insecure operations (file listing and moving). | ||
+ | -i Filters. | ||
+ | -k key OpenSSL private key file. | ||
+ | -l log_file | ||
+ | -m size | ||
+ | -o Enable file overwrite. | ||
+ | -p port Port to listen on (default 41121). | ||
+ | -q Quiet. Do now print error messages. | ||
+ | -r number | ||
+ | -s Storage directory | ||
+ | -S (install|uninstall|run) Manage the win32 service. | ||
+ | -t time | ||
+ | -v Be verbose (display errors). | ||
+ | -V Be verbose on hard way (display errors and other info). | ||
+ | -w Prompt for OpenSSL private key password. | ||
+ | -x pwd Server password. | ||
+ | -b ip_address | ||
+ | -g port Proxy requests to the given port. | ||
+ | -T Enable tcpwrappers support. | ||
+ | (To use this option, ' | ||
+ | |||
+ | </ | ||
+ | |||
+ | Predefined values for all options will also be shown in the help section. | ||
+ | |||
+ | For all of the following examples. the server is located at the address 192.168.1.1 and the client private key is not protected by pasword. | ||
+ | |||
+ | | ||
+ | < | ||
+ | |||
+ | $ tentacle_server -m 1048576 -s /tmp -v | ||
+ | $ tentacle_client -a 192.168.1.1 -v / | ||
+ | |||
+ | </ | ||
+ | |||
+ | | ||
+ | |||
+ | < | ||
+ | $ tentacle_server -o -p 65000 -s /tmp -v | ||
+ | $ tentacle_client -a 192.168.1.1 -p 65000 -v / | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Simple transfer with authentication based on password: | ||
+ | |||
+ | < | ||
+ | $ tentacle_server -x password -s /tmp -v | ||
+ | $ tentacle_client -a 192.168.1.1 -x password -v / | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Safe transfer, with no client certificate: | ||
+ | |||
+ | < | ||
+ | $ tentacle_server -e cert.pem -k key.pem -w -s /tmp -v | ||
+ | $ tentacle_client -a 192.168.1.1 -c -v / | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Safe transfer with client certificate: | ||
+ | |||
+ | < | ||
+ | $ tentacle_server -e cert.pem -k key.pem -f cacert.pem -w -s /tmp -v | ||
+ | $ tentacle_client -a 192.168.1.1 -e cert.pem -k key.pem -v / | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Safe transfer with client certificate and additional authentication with password (notice the use of the connector '' | ||
+ | |||
+ | < | ||
+ | $ tentacle_server -x password -e cert.pem -k key.pem -f cacert.pem -w -s /tmp -v | ||
+ | $ tentacle_client \ | ||
+ | -a 192.168.1.1 \ | ||
+ | -x password \ | ||
+ | -e cert.pem \ | ||
+ | -k key.pem \ | ||
+ | -v / | ||
+ | |||
+ | </ | ||
+ | |||
+ | The Tentacle | ||
+ | |||
+ | < | ||
+ | $ tentacle_server -F / | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Tentacle Proxy ==== | ||
+ | |||
+ | The Tentacle server can act as a proxy, communicating many Tentacle clients to an inaccessible Tentacle server. | ||
+ | |||
+ | The following diagram shows how the Tentacle proxy server works: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | The proxy does not have any information, | ||
+ | |||
+ | < | ||
+ | $ tentacle_server -b 192.168.200.200 -g 65000 | ||
+ | |||
+ | </ | ||
+ | |||
+ | These parameters are** IP address** ('' | ||
+ | < | ||
+ | $ tentacle_server -a 192.168.100.100 -p 45000 -b 192.168.200.200 -g 65000 | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round info 60%>The tentacle in proxy mode also supports authentication and encryption parameters.</ | ||
+ | |||
+ | |||
+ | ===== Installing PERL for Windows ===== | ||
+ | |||
+ | This brief guide is conceived to help configure and execute Tentacle client and server on MS Windows®. | ||
+ | |||
+ | ==== Installing Perl Version ==== | ||
+ | |||
+ | === Installing Perl Environment === | ||
+ | |||
+ | Through ActiveState® download ActivePerl 5.8 through the following link [[https:// | ||
+ | |||
+ | === Installing the module IO-Socket-SSL === | ||
+ | |||
+ | Download and install OpenSSL from: | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | Download the following perl modules: | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | And run from the command prompt in the directory where the '' | ||
+ | < | ||
+ | |||
+ | ppm install Net_SSLeay.pm.ppd ppm install IO-Socket-SSL.ppd | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | === Running the Tentacle Client and Server === | ||
+ | |||
+ | The execution is similar to that of systems Unix/Linux, just enter the Perl command at the beginning, followed by the whole syntax, for instance: | ||
+ | |||
+ | < | ||
+ | |||
+ | </ | ||
+ | ===== Tentacle Protocol Definition | ||
+ | |||
+ | The Tentacle protocol itself is very simple and straightforward. Some important characteristics are: | ||
+ | |||
+ | | ||
+ | | ||
+ | * The following characters can not be part of a file name: | ||
+ | |||
+ | < | ||
+ | '?[]/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ASCII sequence diagrams will be used to illustrate use cases. Commands are enclosed in single quotes. | ||
+ | |||
+ | |||
+ | ==== Sending Files ==== | ||
+ | |||
+ | A successful file transfer is shown first. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | To allow multiple file transfers within the same session, a new **SEND** command may be sent **after a successful file transfer** and before a **QUIT**. | ||
+ | |||
+ | If the server refuses to accept a file, a generic error message is sent back to the client. For security reasons, no details are provided. This happens if the file: | ||
+ | |||
+ | * Has an invalid file name, or a path is specified. | ||
+ | * Is empty or exceeds the server' | ||
+ | * Already exists on the server and file overwrite is not enabled. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | [[:wiki:pfms-tentacle-error.png? | ||
+ | |||
+ | |||
+ | ==== Receiving Files ==== | ||
+ | |||
+ | Single files can be requested from the server. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | The client has the chance to reject the file after the server reports its size. | ||
+ | |||
+ | As with **SEND**, a new **RECV** command may be sent **after a successful file retrieval** (even if the file was rejected by the client) and before a **QUIT** command. A generic error message is sent if the server refuses to send the file. The latter happens if the file: | ||
+ | |||
+ | * Has an invalid file name, or a path is specified. | ||
+ | * Does not exist on the server. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | |||
+ | ==== Password Authentication ==== | ||
+ | |||
+ | If the server requires a password, the client must authenticate before sending any other command. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | A double MD5 of the password is sent to hide the actual password, but bear in mind that this does **NOT** add any extra security under an unencrypted connection. If you need secure file transfers always enable SSL-encrypted connections. | ||
+ | |||
+ | |||
+ | ==== Error Handling ==== | ||
+ | |||
+ | Under any error condition the server will shut down the connection without giving any explanation. Be it because of a bad command, a bad password, more data than that reported being sent, etc. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP center round info 60%>\\ | ||
+ | By default, the Tentacle log is configured at ''/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== OpenSSL Certificates Quick Guide ===== | ||
+ | |||
+ | This is just a quick guide that will get you started with OpenSSL certificates. See [[http:// | ||
+ | |||
+ | ==== Creating a Certificate ==== | ||
+ | |||
+ | Preparing the environment: | ||
+ | |||
+ | < | ||
+ | $ mkdir demoCA | ||
+ | $ mkdir demoCA/ | ||
+ | $ mkdir demoCA/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | |||
+ | Remember to set in place, for safety reasons, writing and reading permissions of the different users in your system in the recently created folders. | ||
+ | |||
+ | </ | ||
+ | |||
+ | The following step is make a self-signed CA certificate and move it to the created directories: | ||
+ | |||
+ | < | ||
+ | $ openssl req -new -x509 -keyout cakey.pem -out cacert.pem | ||
+ | $ mv cakey.pem demoCA/ | ||
+ | $ mv cacert.pem demoCA/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | Fill in the requested fields for the certificate and remember them because you will need them again later on, exactly the same ones. Now create a certificate request: | ||
+ | |||
+ | < | ||
+ | $ openssl req -new -keyout tentaclekey.pem -out tentaclereq.pem -days 360 | ||
+ | |||
+ | </ | ||
+ | |||
+ | Sign the certificate request, setting in addition a consecutive serial as a control and aduting system: | ||
+ | |||
+ | < | ||
+ | $ cat tentaclereq.pem tentaclekey.pem> | ||
+ | $ touch demoCA/ | ||
+ | $ echo " | ||
+ | $ openssl ca -out tentaclecert.pem -in tentaclenew.pem | ||
+ | |||
+ | </ | ||
+ | |||
+ | Bear on mind that if the [[https:// | ||
+ | |||
+ | |||
+ | ==== Creating a Self-Signed Certificate ==== | ||
+ | |||
+ | < | ||
+ | $ openssl req -new -x509 -keyout tentaclekey.pem -out tentaclecert.pem -days 360 | ||
+ | |||
+ | </ | ||
+ | ==== Generating an RSA Private Key ==== | ||
+ | |||
+ | This is very useful to avoid having to enter a password on the client side using Tentacle. | ||
+ | |||
+ | Generate the key: | ||
+ | |||
+ | < | ||
+ | $ openssl genrsa -out tentaclekey.pem | ||
+ | |||
+ | </ | ||
+ | |||
+ | And replace '' | ||
+ | ==== Exporting certificate to another format ==== | ||
+ | |||
+ | Certificates can be required in DER format instead of PEM for some operative systems (such as Ubuntu® or Windows®). If that is the case, you may obatin the certificate of said format through the generated PEM: | ||
+ | |||
+ | < | ||
+ | openssl x509 -outform der -in tentaclecert.pem -out tentaclecert.der | ||
+ | |||
+ | </ | ||
+ | ===== Tentacle configuration guide with security options ===== | ||
+ | |||
+ | This guide will explain step by step how to configure both **Agent Software** and **Tentacle server** to ensure safe communication. | ||
+ | |||
+ | First, it is recommended to carry out manual tests from the devices to make sure configuration, | ||
+ | |||
+ | Then configure permanently the according configuration files: | ||
+ | |||
+ | **Tentacle servers** | ||
+ | |||
+ | ''/ | ||
+ | |||
+ | **Unix/ | ||
+ | |||
+ | ''/ | ||
+ | |||
+ | **MS Windows® software agents** | ||
+ | |||
+ | '' | ||
+ | |||
+ | **Satellite servers** | ||
+ | |||
+ | '' | ||
+ | |||
+ | **Tentacle Proxy servers** | ||
+ | |||
+ | ''/ | ||
+ | |||
+ | Remember to restart the according services after any modification. In the case of Unix/Linux, you may also use the option '' | ||
+ | |||
+ | |||
+ | ==== Communication encryption ==== | ||
+ | |||
+ | Both the Tentacle server and the Software Agents can use a secure communication with certificates and password, either direct communication between both, or through a Tentacle Proxy server. | ||
+ | |||
+ | <WRAP center round info 60%>It is **ALWAYS** necessary to indicate in the parameters the absolute paths where the certificates are located, e.g. ''/ | ||
+ | |||
+ | </ | ||
+ | <WRAP center round important 60%>To use Tentacle' | ||
+ | |||
+ | </ | ||
+ | |||
+ | In the previous sections the various combinations are explained in detail; in this section the password options, Tentacle Proxy server and the use of '' | ||
+ | |||
+ | **Simple transfer with password-based authentication: | ||
+ | |||
+ | Extra parameter in the server for password: | ||
+ | < | ||
+ | |||
+ | -x password | ||
+ | |||
+ | </ | ||
+ | |||
+ | Extra parameter in the client for password ( '' | ||
+ | < | ||
+ | -x password | ||
+ | |||
+ | </ | ||
+ | |||
+ | **Secure transfer, without client certificate: | ||
+ | |||
+ | Extra parameters on the server: | ||
+ | |||
+ | < | ||
+ | -e tentacle_cert -k tentacle_key | ||
+ | |||
+ | </ | ||
+ | |||
+ | **Secure transfer with customer certificate** | ||
+ | |||
+ | Extra parameters on the server: | ||
+ | |||
+ | < | ||
+ | -e tentacle_cert -k tentacle_key -f ca_cert | ||
+ | |||
+ | </ | ||
+ | |||
+ | Extra parameters in the client ( '' | ||
+ | < | ||
+ | -e tentacle_client_cert -k tentacle_client_key | ||
+ | |||
+ | </ | ||
+ | |||
+ | **Secure transfer with client certificate and additional password authentication: | ||
+ | |||
+ | Extra parameters on the server: | ||
+ | |||
+ | < | ||
+ | -x password -e tentacle_cert -k tentacle_key -f ca_cert | ||
+ | |||
+ | </ | ||
+ | |||
+ | Extra parameters in the client ( '' | ||
+ | < | ||
+ | -x password -e tentacle_client_cert -k tentacle_client_key | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Certificate configuration in Tentacle server accepting any certificate in client ==== | ||
+ | |||
+ | For this configuration, | ||
+ | |||
+ | When laucnhing the **server** manually, include the parameters '' | ||
+ | < | ||
+ | $ su - pandora -s /bin/bash | ||
+ | # tentacle_server -v -e tentacle_cert -k tentacle_key -s /tmp | ||
+ | |||
+ | </ | ||
+ | |||
+ | Launch in the **client** manually, include the '' | ||
+ | < | ||
+ | $ echo test> file.txt | ||
+ | $ tentacle_client -v -c -a 192.168.70.125 file.txt | ||
+ | |||
+ | </ | ||
+ | |||
+ | If this manual execution works properly, you may continue with the permanent configuration in the appropriate file: | ||
+ | |||
+ | * For** Tentacle servers**: | ||
+ | |||
+ | < | ||
+ | ssl_cert tentacle_cert | ||
+ | ssl_key tentacle_key | ||
+ | |||
+ | </ | ||
+ | |||
+ | * For **Software Agents**: | ||
+ | |||
+ | < | ||
+ | server_opts -c | ||
+ | |||
+ | </ | ||
+ | |||
+ | * For** Satellite servers**: | ||
+ | |||
+ | < | ||
+ | server_opts -c | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Tentacle server and client certificate configuration verifying the certificate with a specific CA in client ==== | ||
+ | |||
+ | For this configuration, | ||
+ | |||
+ | When launching the **server** manually, include the '' | ||
+ | < | ||
+ | |||
+ | # su - pandora -s /bin/bash | ||
+ | # tentacle_server -v -e tentacle_cert -k tentacle_key -s /tmp | ||
+ | |||
+ | </ | ||
+ | |||
+ | When launching the **client** manually, include the '' | ||
+ | < | ||
+ | # echo test> file.txt | ||
+ | # tentacle_client -v -e tentacle_client_cert -f ca_cert -a 192.168.70.125 file.txt | ||
+ | |||
+ | </ | ||
+ | |||
+ | If this manual execution works properly, permanent configuration will be possible in the appropriate file. | ||
+ | |||
+ | * For **Tentacle servers**: | ||
+ | |||
+ | < | ||
+ | | ||
+ | | ||
+ | |||
+ | </ | ||
+ | |||
+ | * For Pandora FMS **Software Agents**: | ||
+ | |||
+ | < | ||
+ | server_opts -e tentacle_client_cert -f ca_cert | ||
+ | |||
+ | </ | ||
+ | |||
+ | * For Pandora FMS **Satellite servers**: | ||
+ | |||
+ | < | ||
+ | server_opts -e tentacle_client_cert -f ca_cert | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Tentacle server and client certificate configuration verifying the certificate with a specific CA in server ==== | ||
+ | |||
+ | For this configuration, | ||
+ | |||
+ | When launching the **server** manually, include the '' | ||
+ | < | ||
+ | # su - pandora -s /bin/bash | ||
+ | # tentacle_server -v -e tentacle_cert -k tentacle_key -f ca_cert -s /tmp | ||
+ | |||
+ | </ | ||
+ | |||
+ | When launching the **client** manually, include the '' | ||
+ | < | ||
+ | # echo test> file.txt | ||
+ | # tentacle_client -v \ | ||
+ | -e tentacle_client_cert \ | ||
+ | -k tentacle_client_key \ | ||
+ | -a 192.168.70.125 file.txt | ||
+ | |||
+ | </ | ||
+ | |||
+ | If this manual execution works properly, permanent configuration will be possible in the appropriate file. | ||
+ | |||
+ | * For **Tentacle servers**: | ||
+ | |||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | </ | ||
+ | |||
+ | * For Pandora FMS **Software Agents**: | ||
+ | |||
+ | < | ||
+ | server_opts -e tentacle_client_cert -k tentacle_client_key | ||
+ | |||
+ | </ | ||
+ | |||
+ | * For Pandora FMS **Satellite servers**: | ||
+ | |||
+ | < | ||
+ | server_opts -e tentacle_client_cert -k tentacle_client_key | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Tentacle server and client certificate configuration verifying the certificate with a specific CA in both of them ==== | ||
+ | |||
+ | For this configuration, | ||
+ | |||
+ | When launching the server manually, include the '' | ||
+ | < | ||
+ | # su - pandora -s /bin/bash | ||
+ | # tentacle_server -v -e tentacle_cert -k tentacle_key -f ca_cert -s /tmp | ||
+ | |||
+ | </ | ||
+ | |||
+ | When launching the client manually, include the '' | ||
+ | < | ||
+ | # echo test> file.txt | ||
+ | # tentacle_client -v -e tentacle_client_cert -k tentacle_client_key -f ca_cert -a 192.168.70.125 file.txt | ||
+ | |||
+ | </ | ||
+ | |||
+ | If this manual execution works properly, permanent configuration will be possible. | ||
+ | |||
+ | * For **Tentacle servers**: | ||
+ | |||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | </ | ||
+ | |||
+ | * For Pandora FMS **Software Agents**: | ||
+ | |||
+ | < | ||
+ | server_opts -e tentacle_client_cert -k tentacle_client_key -f ca_cert | ||
+ | |||
+ | </ | ||
+ | |||
+ | * For Pandora FMS **Satellite servers**: | ||
+ | |||
+ | < | ||
+ | server_opts -e tentacle_client_cert -k tentacle_client_key -f ca_cert | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Safe Tentacle configuration ==== | ||
+ | |||
+ | Both the Tentacle server and the software agents can use safe communication | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | |||
+ | </ | ||
+ | <WRAP center round important 60%>To use Tentacle safe options, please verify the package '' | ||
+ | |||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | In previous sections, the different combinations are explained in detail; in this section we add options such as password, Tentacle Proxy server and the use of '' | ||
+ | |||
+ | **Simple transfer | ||
+ | |||
+ | Extra parameter in the server for password: | ||
+ | |||
+ | < | ||
+ | -x password | ||
+ | |||
+ | </ | ||
+ | |||
+ | Extra parameter in the client for password ( '' | ||
+ | < | ||
+ | -x password | ||
+ | |||
+ | </ | ||
+ | |||
+ | **Safe transfer, with no client certificate: | ||
+ | |||
+ | Extra server parameters: | ||
+ | |||
+ | < | ||
+ | -e tentacle_cert -k tentacle_key | ||
+ | |||
+ | </ | ||
+ | |||
+ | **Safe transfer with client certificate** | ||
+ | |||
+ | Extra server parameters: | ||
+ | |||
+ | < | ||
+ | -e tentacle_cert -k tentacle_key -f ca_cert | ||
+ | |||
+ | </ | ||
+ | |||
+ | Extra client parameters | ||
+ | < | ||
+ | -e tentacle_client_cert -k tentacle_client_key | ||
+ | |||
+ | </ | ||
+ | |||
+ | **Safe transfer with client certificate and additional authentication with password: | ||
+ | |||
+ | Extra server parameters: | ||
+ | |||
+ | < | ||
+ | -x password -e tentacle_cert -k tentacle_key -f ca_cert | ||
+ | |||
+ | </ | ||
+ | |||
+ | Extra client parameters ( '' | ||
+ | < | ||
+ | -x password -e tentacle_client_cert -k tentacle_client_key | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | === Tentacle proxy safe configuration use case === | ||
+ | |||
+ | You are explained step by step how to configure both software agents as well as the Tentacle server for safe communication, | ||
+ | |||
+ | **Manual tests:** | ||
+ | |||
+ | 1. Start tentacle_server manually: | ||
+ | |||
+ | < | ||
+ | sudo -u user tentacle_server \ | ||
+ | -x password \ | ||
+ | -e tentacle_cert \ | ||
+ | -k tentacle_key \ | ||
+ | -f ca_cert -s /tmp -v | ||
+ | |||
+ | </ | ||
+ | |||
+ | 2. Start the proxy manually: | ||
+ | |||
+ | < | ||
+ | sudo -u user tentacle_server -b ip_server -g 41124 | ||
+ | |||
+ | </ | ||
+ | |||
+ | 3. Start tentacle_client manually: | ||
+ | |||
+ | < | ||
+ | sudo -u user tentacle_client \ | ||
+ | -a ip_proxy/ | ||
+ | -x password \ | ||
+ | -e tentaclecert.pem \ | ||
+ | -k tentaclekey.pem \ | ||
+ | -v file | ||
+ | |||
+ | </ | ||
+ | |||
+ | Once you have checked that the file was sent successfully, | ||
+ | |||
+ | To configure tentacle_server with the certificate options, edite the starting script of the service **tentacle_serverd**, | ||
+ | |||
+ | **Permanent configuration: | ||
+ | |||
+ | 1. Start the server with SSL. Modify the booting script ''/ | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP center round tip 75%> Remember that each time you make changes to the tentacle configuration file, it is necessary to restart the service for the changes to take effect: ''/ | ||
+ | |||
+ | </ | ||
+ | 2. Start the proxy. As in the previous point number 1, modify the configuration file ''/ | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP center round tip 75%> Remember that each time you make changes to the tentacle configuration file, it is necessary to restart the service for the changes to take effect: ''/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | 3. Start the Software Agent with the corresponding options. Modify the file '' | ||
+ | < | ||
+ | -x password -e tentacle_client_cert -k tentacle_client_key | ||
+ | |||
+ | </ | ||
+ | |||
+ | Remember that the // | ||
+ | < | ||
+ | server_opts -x password -e tentacle_client_cert -k tentacle_client_key | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round tip 60%>\\ | ||
+ | If you do not want to use any of the options, such as the password, simply do not use the corresponding parameter.\\ | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Tentacle data compression ==== | ||
+ | |||
+ | <WRAP center round tip 60%>\\ | ||
+ | Version NG 725 or superior.\\ | ||
+ | </ | ||
+ | Tentacle allows enabling data compression with the option '' | ||
+ | |||
+ | |||
+ | === Pandora FMS Agent === | ||
+ | |||
+ | Edit the file ''/ | ||
+ | < | ||
+ | server_opts -z | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | === Satellite server === | ||
+ | |||
+ | Edit the file ''/ | ||
+ | < | ||
+ | server_opts -z | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== Configuration file elements ===== | ||
+ | |||
+ | By default the Tentacle configuration file is located at ''/ | ||
+ | |||
+ | <WRAP center round info 60%> | ||
+ | |||
+ | Remember that each time you make changes to the Tentacle configuration file, it is necessary to restart the service for the changes to take effect:\\ | ||
+ | ''/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== addresses ==== | ||
+ | |||
+ | < | ||
+ | # [-a] IPv4 address to listen on. Several IP address can be selected separating it by comma. | ||
+ | addresses 0.0.0.0 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * IPv4 address where the Tentacle will listen. Several IP addresses can be separated by comma. | ||
+ | * Paramaeter equivalent by command line: '' | ||
+ | |||
+ | |||
+ | ==== port ==== | ||
+ | |||
+ | < | ||
+ | # [-p] Port number to listen on | ||
+ | port 41121 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Port number where the Tentacle server will listen. | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== max_connections ==== | ||
+ | |||
+ | < | ||
+ | # [-c] Maximum number of simultaneous connections | ||
+ | max_connections 10 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Maximum number of simultaneous connections. | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== daemon ==== | ||
+ | |||
+ | < | ||
+ | # [-d] Run as daemon. 1 true, 0 false | ||
+ | daemon 1 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Execute as //[[:en:documentation:01_understanding: | ||
+ | | ||
+ | |||
+ | |||
+ | ==== insecure ==== | ||
+ | |||
+ | < | ||
+ | # [-I] Enable insecure mode | ||
+ | insecure 0 | ||
+ | |||
+ | </ | ||
+ | |||
+ | | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== filters ==== | ||
+ | |||
+ | < | ||
+ | # Filters (regexp: | ||
+ | filters .*\.conf: | ||
+ | |||
+ | </ | ||
+ | |||
+ | * It allwos to set filters by file types in specfic directories. Add a regular expression (filter as such) separated by '':'' | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== max_size ==== | ||
+ | |||
+ | < | ||
+ | # [-m] Maximum file size allowed by the server in bytes | ||
+ | max_size 2000000 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Maximum file size allowed (in bytes). | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== overwrite ==== | ||
+ | |||
+ | < | ||
+ | # [-o] Accept files with a repeated name. 1 true, 0 false. | ||
+ | overwrite 0 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * It allows to overwrite if the received file has the same name and already exists, disabled by default ('' | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== quiet ==== | ||
+ | |||
+ | < | ||
+ | # [-q] Do not output error messages. | ||
+ | quiet 0 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Avoid to show error messages; enabled '' | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== retries ==== | ||
+ | |||
+ | < | ||
+ | # [-r] Number of retries for socket read/write operations | ||
+ | retries 3 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Number of retries for reading and writing operations. | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== directory ==== | ||
+ | |||
+ | < | ||
+ | # [-s] Storage directory | ||
+ | directory / | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Il allows to set the storage directory. | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== proxy_ip ==== | ||
+ | |||
+ | < | ||
+ | # [-b] IP address to proxy client | ||
+ | proxy_ip 127.0.0.1 | ||
+ | |||
+ | </ | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | ==== proxy_port ==== | ||
+ | |||
+ | < | ||
+ | # [-g] Port number to proxy client requests to | ||
+ | proxy_port 41121 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * It allows to set the port number for an intermediate device (//proxy client// | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== timeout ==== | ||
+ | |||
+ | < | ||
+ | # [-t] Timeout for socket read/write operations in seconds | ||
+ | timeout 1 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Expiration time in seconds dor reading and writing operations. | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== verbose ==== | ||
+ | |||
+ | < | ||
+ | # [-v and -V] Verbose level | ||
+ | # 0: Do not display any informative messages | ||
+ | # 1: Display only important messages [-v] | ||
+ | # 2: Display all messages [-V] | ||
+ | verbose 0 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * It sets the amount of information to be shown with debugging purposes. | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | |||
+ | ==== log_file ==== | ||
+ | |||
+ | < | ||
+ | # [-l] Log file | ||
+ | log_file /dev/null | ||
+ | |||
+ | </ | ||
+ | |||
+ | * It allows to set an event log. | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== password ==== | ||
+ | |||
+ | < | ||
+ | # [-x] Server password | ||
+ | # password PASSWORD | ||
+ | |||
+ | </ | ||
+ | |||
+ | * It sets the password fot the Tentacle server. | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== ssl_cert ==== | ||
+ | |||
+ | < | ||
+ | # [-e] SSL certificate file full path | ||
+ | # ssl_cert / | ||
+ | |||
+ | </ | ||
+ | |||
+ | * It allows to set the full path to the file that contains the SSL certificate. | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== ssl_ca ==== | ||
+ | |||
+ | < | ||
+ | # [-f] SSL CA file full path | ||
+ | # ssl_ca / | ||
+ | |||
+ | </ | ||
+ | |||
+ | * It allows to set the full path to the file that contains the Cetifying Authority (CA) of the [[: | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== ssl_key ==== | ||
+ | |||
+ | < | ||
+ | # [-k] SSL private key file | ||
+ | # ssl_key / | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Location of the file with the private key of the SSL certificate. | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== ssl_password ==== | ||
+ | |||
+ | < | ||
+ | # [-w] SSL password. Set to 1 to ask for password by command line | ||
+ | # ssl_password 0 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * If the SSL certificate contains a password, it allows to request it ('' | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | |||
+ | ==== use_libwrap ==== | ||
+ | |||
+ | < | ||
+ | # [-T] Use libwrap library (Authen:: | ||
+ | # use_libwrap 0 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * For Perl language, it allows to use the module '' | ||
+ | * Equivalent parameter by command line: '' | ||
+ | |||
+ | [[: | ||
- | [[Category: Tentacle]] |