# Configuring Logstash to Accept Both SSL and Non-SSL Connections

**URL:** <https://discuss.elastic.co/t/configuring-logstash-to-accept-both-ssl-and-non-ssl-connections/352528>\
**Category:** Logstash\
**Created:** [February 5, 2024, 12:03pm UTC](https://discuss.elastic.co/t/configuring-logstash-to-accept-both-ssl-and-non-ssl-connections/352528 "2024-02-05T12:03:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)\
**Post date:** [February 5, 2024, 12:03pm UTC](https://discuss.elastic.co/t/configuring-logstash-to-accept-both-ssl-and-non-ssl-connections/352528/1 "2024-02-05T12:03:32Z")

</div>

Hi,

I'm currently working on setting up Logstash to accept both SSL and non-SSL connections from Beats. From my understanding, I would need to configure two separate Beats inputs on different ports. For example:

```auto
input {
  beats {
    port => 5044
    ssl_enabled => true
    ...
  }
  beats {
    port => 5045
    ...
  }
}

```

In this configuration, Logstash would accept SSL connections on port 5044 and non-SSL connections on port 5045. I would then need to configure my Beats agents to send data to the correct port depending on whether they are using SSL.

Can anyone confirm if this is the correct approach? Are there any potential issues or considerations I should be aware of?

Thank you in advance for your help.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 5, 2024, 4:28pm UTC](https://discuss.elastic.co/t/configuring-logstash-to-accept-both-ssl-and-non-ssl-connections/352528/2 "2024-02-05T16:28:57Z")

</div>

> [@yago82](#):
>
> Can anyone confirm if this is the correct approach?

Sounds correct to me.

---

<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:** [March 4, 2024, 4:29pm UTC](https://discuss.elastic.co/t/configuring-logstash-to-accept-both-ssl-and-non-ssl-connections/352528/3 "2024-03-04T16:29:01Z")

</div>

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