title: ipTables blocking memcached
body: <p>I have one server running memcached and another server that should be able to connect to the memcached server.</p>
  
  <p>memcached is set up to listen to 0.0.0.0:5666</p>
  
  <p>This allows for anyone to connect to it so i want to block the port 5666 for everyone except the other server. I thought this would do it:</p>
  
  <pre><code>iptables -A INPUT -p tcp --dport 5666 -j REJECT
  iptables -A INPUT -p tcp -s 79.xxx.xxx.xxx --dport 5666 -j ACCEPT
  </code></pre>
  
  <p>But it did not, now i can not connect at all from the other server, before it worked fine.</p>