title: Redis - Connect to Remote Server
body: <p>I've just install Redis succesfully using the instructions on the Quick Start guide on <a href="http://redis.io/topics/quickstart">http://redis.io/topics/quickstart</a> on my Ubuntu 10.10 server. I'm running the service as  dameon (so it can be run by init.d)</p>
  
  <p>The server is part of Rackspace Cluster with Internal and External IPs. The host is running on port 6379 (standard for Redis)</p>
  
  <p>I've added a row in the iptables to allow incoming connections from port 6379 as shown below:</p>
  
  <pre><code> ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:6379 
  </code></pre>
  
  <p>In my PHP code on another server, I'm trying to connect to the new Redis server here:</p>
  
  <pre><code>$this-&gt;load-&gt;helper("iredis");
  
  $hostname = "IP ADDRESS HERE";
  
  $redis = new iRedis(array('hostname' =&gt; $hostname, 'port' =&gt; 6379));
  </code></pre>
  
  <p>Once I do this - I always get a connection refused. In my    redis.conf   file, I have the local bind command commented out, so it should be listening on more than the localhost IP. I can connect to the database on the local machine just not on another server. I've tried the external and internal IPs with no luck.</p>
  
  <p>Any suggestions on getting this to work?</p>