# Enabling security in Basic subscription

**URL:** <https://discuss.elastic.co/t/enabling-security-in-basic-subscription/253449>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [October 27, 2020, 2:19pm UTC](https://discuss.elastic.co/t/enabling-security-in-basic-subscription/253449 "2020-10-27T14:19:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johann\_Hochtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johann_hochtl/32/77789_2.png) [@Johann\_Hochtl](https://discuss.elastic.co/u/Johann_Hochtl)\
**Post date:** [October 27, 2020, 2:19pm UTC](https://discuss.elastic.co/t/enabling-security-in-basic-subscription/253449/1 "2020-10-27T14:19:22Z")

</div>

I am using elasticsearch 7.9, Basic subscription

I followed [https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-security.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-security.html)

I enabled security in elastic with this configuration:

```auto
    xpack.security.enabled: true
    xpack.security.transport.ssl.enabled: true
    xpack.security.transport.ssl.verification_mode: none
    xpack.security.transport.ssl.keystore.path: elastic-certificates.p12 
    xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
    xpack.security.authc:
      anonymous:
        authz_exception: false

```

I started elastic from docker, mounting local configuration. I check if the configuration is picked up by docker exec -it elastic cat /usr/share/elasticsearch/config/elasticsearch.yml

The certificate file is also available from within docker.

I set default passwords with `elasticsearch-setup-passwords` by running docker exec -it bash and then the command

After restarting elastic, I cannot curl elastic form the host OS, the error message is:

[john@ebola config]$ curl -u elastic localhost:9200  
Enter host password for user 'elastic':  
curl: (56) Recv failure: Connection reset by peer

There are no errors according to `docker logs elastic`

When I docker exec -it elastic bash and call curl -u elastic localhost:9200 elastic successfully responds.

Please help!

---

<div class="post-metadata">

**Author:** ![Johann\_Hochtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johann_hochtl/32/77789_2.png) [@Johann\_Hochtl](https://discuss.elastic.co/u/Johann_Hochtl)\
**Post date:** [October 27, 2020, 3:18pm UTC](https://discuss.elastic.co/t/enabling-security-in-basic-subscription/253449/2 "2020-10-27T15:18:39Z")

</div>

Answering my own question: All of the above is required and working, all I had to further add to the elasticsearch configuration file was the line

network.host: 0.0.0.0

> **[Network settings | Elasticsearch Reference \[7.9\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#common-network-settings)**

---

<div class="post-metadata">

**Author:** ![smaccabe](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@smaccabe](https://discuss.elastic.co/u/smaccabe)\
**Post date:** [October 30, 2020, 4:54am UTC](https://discuss.elastic.co/t/enabling-security-in-basic-subscription/253449/3 "2020-10-30T04:54:30Z")

</div>

Thank you for asking this question and for following up with the additional information! I've not tested this yet but this is what I need to figure out next.

---

<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:** [November 27, 2020, 4:54am UTC](https://discuss.elastic.co/t/enabling-security-in-basic-subscription/253449/4 "2020-11-27T04:54:31Z")

</div>

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