REDIS configuration

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

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

The ip is

bind 10.25.175.77 10.25.145.151

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?

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

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

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

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

Another security option: With version 5.0 alpha3 redis output supports TLS including client authentication support. One can hide redis right behind stunnel for example and make redis port itself available to localhost only.

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