# REDIS configuration

**URL:** <https://discuss.elastic.co/t/redis-configuration/51432>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 31, 2016, 1:23pm UTC](https://discuss.elastic.co/t/redis-configuration/51432 "2016-05-31T13:23:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandhya\_Rathinapandi](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sandhya\_Rathinapandi](https://discuss.elastic.co/u/Sandhya_Rathinapandi)\
**Post date:** [May 31, 2016, 1:23pm UTC](https://discuss.elastic.co/t/redis-configuration/51432/1 "2016-05-31T13:23:36Z")

</div>

I am trying to restrict the redis access to only few ip's

My configurations below:

bind 10.xx.xx.xx1 10.xx.xx.xx2  
protected-mode yes

And I am getting the error:

Creating Server TCP listening socket 10.xx.xx.xx1:6379: bind: Cannot assign requested address

When I tried binding 10.0.0.1 and the local ip, it is working

Thanks

---

<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:** [June 1, 2016, 9:35am UTC](https://discuss.elastic.co/t/redis-configuration/51432/2 "2016-06-01T09:35:47Z")

</div>

> [@Sandhya\_Rathinapandi](#):
>
> 10.xx.xx.xx1

this doesn't look like a valid IP to me.

---

<div class="post-metadata">

**Author:** ![Sandhya\_Rathinapandi](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sandhya\_Rathinapandi](https://discuss.elastic.co/u/Sandhya_Rathinapandi)\
**Post date:** [June 1, 2016, 10:47am UTC](https://discuss.elastic.co/t/redis-configuration/51432/3 "2016-06-01T10:47:02Z")

</div>

> [@Sandhya\_Rathinapandi](#):
>
> bind 10.xx.xx.xx1 10.xx.xx.xx2

The ip is

bind 10.25.175.77 10.25.145.151

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 1, 2016, 5:25pm UTC](https://discuss.elastic.co/t/redis-configuration/51432/4 "2016-06-01T17:25:44Z")

</div>

Do those two IP addresses belong to the Redis server? Or are they the IP addresses if the clients that should be able to connect?

---

<div class="post-metadata">

**Author:** ![Sandhya\_Rathinapandi](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sandhya\_Rathinapandi](https://discuss.elastic.co/u/Sandhya_Rathinapandi)\
**Post date:** [June 1, 2016, 5:37pm UTC](https://discuss.elastic.co/t/redis-configuration/51432/5 "2016-06-01T17:37:51Z")

</div>

These are the IP of the client that is trying to connect

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 1, 2016, 5:44pm UTC](https://discuss.elastic.co/t/redis-configuration/51432/6 "2016-06-01T17:44:06Z")

</div>

Then it won't work. That configuration option affects which interfaces to listen on. It's not used for access control for connecting clients.

---

<div class="post-metadata">

**Author:** ![Sandhya\_Rathinapandi](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sandhya\_Rathinapandi](https://discuss.elastic.co/u/Sandhya_Rathinapandi)\
**Post date:** [June 2, 2016, 7:40am UTC](https://discuss.elastic.co/t/redis-configuration/51432/7 "2016-06-02T07:40:33Z")

</div>

ok. Let me make it clear.

I have Redis in one server and filebeat in 2 other servers.

Now My redis should be able to accept data only from my filebeat servers. In other words, I wanted to have this secure.

How can this be done.

Thanks in Advance

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 2, 2016, 7:44am UTC](https://discuss.elastic.co/t/redis-configuration/51432/8 "2016-06-02T07:44:08Z")

</div>

You can configure Redis to require a password for connections or set up a firewall rule to limit which hosts can connect.

---

<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:** [June 2, 2016, 9:02am UTC](https://discuss.elastic.co/t/redis-configuration/51432/9 "2016-06-02T09:02:48Z")

</div>

Another security option: With version 5.0 alpha3 redis output supports TLS including client authentication support. One can hide redis right behind [stunnel](https://www.stunnel.org/index.html) for example and make redis port itself available to localhost only.

---

<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 21, 2016, 1:23pm UTC](https://discuss.elastic.co/t/redis-configuration/51432/10 "2016-06-21T13:23:46Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
