# Write to kafka topic in a secure way

**URL:** <https://discuss.elastic.co/t/write-to-kafka-topic-in-a-secure-way/304309>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 10, 2022, 6:22am UTC](https://discuss.elastic.co/t/write-to-kafka-topic-in-a-secure-way/304309 "2022-05-10T06:22:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivendra95](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@shivendra95](https://discuss.elastic.co/u/shivendra95)\
**Post date:** [May 10, 2022, 6:22am UTC](https://discuss.elastic.co/t/write-to-kafka-topic-in-a-secure-way/304309/1 "2022-05-10T06:22:42Z")

</div>

I'm using filebeat to write logs to Kafka topic. My Kafka server is running on a different ec2 server. I want to create a secure connection between the server from which I'm sending logs and the Kafka server.  
Is there a way to achieve this?

---

<div class="post-metadata">

**Author:** ![ibra\_013](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ibra_013/32/104827_2.png) [@ibra\_013](https://discuss.elastic.co/u/ibra_013)\
**Post date:** [May 10, 2022, 9:39am UTC](https://discuss.elastic.co/t/write-to-kafka-topic-in-a-secure-way/304309/2 "2022-05-10T09:39:06Z")

</div>

Hi,

In filebeat configuration file , Kafka output section, you can enable ssl settings for https for example.

---

<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:** [June 7, 2022, 11:39am UTC](https://discuss.elastic.co/t/write-to-kafka-topic-in-a-secure-way/304309/3 "2022-06-07T11:39:15Z")

</div>

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