# Problems securing communication between filebeat and logstash

**URL:** <https://discuss.elastic.co/t/problems-securing-communication-between-filebeat-and-logstash/111993>\
**Category:** Logstash\
**Created:** [December 15, 2017, 1:50pm UTC](https://discuss.elastic.co/t/problems-securing-communication-between-filebeat-and-logstash/111993 "2017-12-15T13:50:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![strt](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@strt](https://discuss.elastic.co/u/strt)\
**Post date:** [December 15, 2017, 1:50pm UTC](https://discuss.elastic.co/t/problems-securing-communication-between-filebeat-and-logstash/111993/1 "2017-12-15T13:50:17Z")

</div>

I have the ELK stack installed with filebeat configured on the client machine. How do I go about securing the connection.

I've tried here:-

> **[How To Install Elasticsearch, Logstash, and Kibana (ELK Stack) on Ubuntu 16.04 |...](https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-16-04)**
>
> In this tutorial, we will go over the installation of the Elasticsearch ELK Stack on Ubuntu 16.04 (that is, Elasticsearch 2.3.x, Logstash 2.3.x, and Kibana 4.5.x). We will also show you how to configure it to gather and visualize the syslogs of your...

This comes with a message advising that the key should be certificate type pkcs8. I convert the certificate to pkcs8 and change the config to poin to the .p8 and I receive the same error.

I then try following:-

[https://www.elastic.co/guide/en/beats/filebeat/current/configuring-ssl-logstash.html](https://www.elastic.co/guide/en/beats/filebeat/current/configuring-ssl-logstash.html)

copying the generated /etc/ca.crt, /etc/client.crt, /etc/client.key files to the client and changing the config to

```
output.logstash:
  hosts: ["logs.mycompany.com:5044"]
  ssl.certificate_authorities: ["/etc/ca.crt"]
  ssl.certificate: "/etc/client.crt"
  ssl.key: "/etc/client.key"

```

This time I receive an error message advising that the pem file cannot be found, even though it's in the correct location, specified in the config file. I have given the file 0600 permissions.

Has anyone managed to secure the connection?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 12, 2018, 1:50pm UTC](https://discuss.elastic.co/t/problems-securing-communication-between-filebeat-and-logstash/111993/2 "2018-01-12T13:50:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
