title: Uncaught CurlException: 7: couldn't connect to host thrown in /xxx/base_facebook.php on line 886
body: <p>I am getting the above error when I am using Facebook PHP-SDK to implement FB login for my website. I have tried changing the iptables to open ports 80 and 443. Currently my iptables reads like this:</p>
  
  <pre><code>Chain INPUT (policy ACCEPT)
  target     prot opt source               destination         
  ACCEPT     tcp  --  anywhere             anywhere            multiport dports www,https       state NEW,ESTABLISHED 
  ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:www 
  ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:https 
  
  Chain FORWARD (policy ACCEPT)
  target     prot opt source               destination         
  
  Chain OUTPUT (policy ACCEPT)
  target     prot opt source               destination         
  ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:www 
  ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:https 
  </code></pre>