# Creating certificates for filebeat

**URL:** <https://discuss.elastic.co/t/creating-certificates-for-filebeat/38585>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [January 7, 2016, 9:18am UTC](https://discuss.elastic.co/t/creating-certificates-for-filebeat/38585 "2016-01-07T09:18:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ironbeast](https://avatars.discourse-cdn.com/v4/letter/i/b5a626/32.png) [@ironbeast](https://discuss.elastic.co/u/ironbeast)\
**Post date:** [January 7, 2016, 9:18am UTC](https://discuss.elastic.co/t/creating-certificates-for-filebeat/38585/1 "2016-01-07T09:18:38Z")

</div>

Dear all,

For logstashforwarder I had to create certificates containing the hostnames of the logstash servers.  
Do I have to do this the same for filebeat? Or can I now once again create wildcards ssl-certs without the hostnames in it?  
In other words, what is the correct way to create certs for filebeat to logstash servers?

Kind regards and thanks in advance!

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [January 7, 2016, 9:48am UTC](https://discuss.elastic.co/t/creating-certificates-for-filebeat/38585/2 "2016-01-07T09:48:43Z")

</div>

TLS validation is provided by golang runtime system. As filebeat inherited loads of code from logstash-forwarder, it has similar requirements regarding certificates.

I would not consider not having any hostname in your certificate as secure. In this case you can try the [insecure](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-configuration-details.html#_insecure) setting suppressing hostname checks. Or disable TLS altogether.

Are you using self-signed certificate or have you considered having root CAs already?

---

<div class="post-metadata">

**Author:** ![ironbeast](https://avatars.discourse-cdn.com/v4/letter/i/b5a626/32.png) [@ironbeast](https://discuss.elastic.co/u/ironbeast)\
**Post date:** [January 7, 2016, 9:52am UTC](https://discuss.elastic.co/t/creating-certificates-for-filebeat/38585/3 "2016-01-07T09:52:13Z")

</div>

Well, I can do both... Can you give me an example to create these certifcates? I already started with creating them, (self signed), but I get an error... (transport.go:125: SSL client failed to connect with: EOF). So if you can give me an example to work with, that would be great 🙂 .

Thanks for the reply.

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [January 7, 2016, 10:11am UTC](https://discuss.elastic.co/t/creating-certificates-for-filebeat/38585/4 "2016-01-07T10:11:38Z")

</div>

what's your logstash and filebeat config? Looks like connection was closed by logstash before even doing the SSL handshake. I assume logstash has printed an error about version something.

Have you set 'ssl =\> true' in logstash config?

---

<div class="post-metadata">

**Author:** ![ironbeast](https://avatars.discourse-cdn.com/v4/letter/i/b5a626/32.png) [@ironbeast](https://discuss.elastic.co/u/ironbeast)\
**Post date:** [January 7, 2016, 10:20am UTC](https://discuss.elastic.co/t/creating-certificates-for-filebeat/38585/5 "2016-01-07T10:20:01Z")

</div>

You're the man. That was it... I forgot the ssl =\> true line... THANKS!!!!

---

<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:** [July 5, 2017, 9:56pm UTC](https://discuss.elastic.co/t/creating-certificates-for-filebeat/38585/6 "2017-07-05T21:56:58Z")

</div>


