title: ORA-12170 TNS listener in oracle 11g
body: <p>I have setup a Windows Server 2008R2 with an oracle server 11g (11.2) and a small database (MYDB) in amazon EC2.</p>
  
  <p>Now I want to connect from my computer to this database (I use PL/SQL developer but I don't mind using other tools)</p>
  
  <p>In server side I have: (where ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com is the public DNS for my Win server.)<br>
  tnsnames.ora:</p>
  
  <pre><code> MYDB =
     (DESCRIPTION =
       (ADDRESS = (PROTOCOL = TCP)(HOST = ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com)(PORT = 1521))
       (CONNECT_DATA =
        (SERVICE_NAME = MYDB)
       )
     )
  </code></pre>
  
  <p>listener.ora:  </p>
  
  <pre><code> # listener.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
   # Generated by Oracle configuration tools.
  
   LISTENER =
       (DESCRIPTION_LIST =
        (DESCRIPTION =
         (ADDRESS = (PROTOCOL = TCP)(HOST = ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com)(PORT = 1521))
         (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
      )
  
     ADR_BASE_LISTENER = C:\app\Administrator
  </code></pre>
  
  <p>At my pc at tnsnames.ora i have:  </p>
  
  <pre><code> MYDB=
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com)(PORT = 1521))
      (CONNECT_DATA =
       (SERVICE_NAME = MYDB)
      )
    )
  </code></pre>
  
  <p>With these settings, I am able to connect locally at my server, but not through my computer.<br>
  I have setup up Security Groups at my EC2:</p>
  
  <p>Inbound rules</p>
  
  <pre><code>Type                Protocol              Port Range     Source
  RDP                 TCP                   3389           Anywhere 0.0.0.0/0
  SSH                 TCP                   22             Anywhere 0.0.0.0/0
  Custom ICMP Rule    Echo Reply            N/A            Anywhere 0.0.0.0/0
  </code></pre>
  
  <p>When I am trying to connect from my computer I get </p>
  
  <blockquote>
    <p>ORA-12170:TNS:Connect timeout occurred.</p>
  </blockquote>
  
  <p>Any ideas what I am doing wrong, or a troubleshooting plan?</p>