I assume you are using node_redis . You can specify the host that you are using:
redis.createClient(port, host, options) --- Create a new client connection. port defaults to 6379 and host defaults to 127.0.0.1.
So you should use:
redis.createClient('1.2.3.4');
This is pretty good in the documentation, and I think you should read it completely.
PS: When you make redis available to remote hosts, I think you should configure the firewall correctly to block access to other IP addresses (whitelist).
source share