title: Configuring Oracle listener to listen externally
body: <p>I'm stuck with Oracle listener configuration. It's listening to localhost, but i can't reach it from an external machine. The network works fine, Oracle is installed on a virtual machine and I'm working over ssh. </p>
  
  <p>My <code>listener.ora</code> file:</p>
  
  <pre><code>LISTENER =
    (DESCRIPTION_LIST =
      (DESCRIPTION =
      (ADDRESS_LIST=
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.110)(PORT = 1530))
      )
    )
  
  ADR_BASE_LISTENER = /home/oracle/app/oracle
  </code></pre>
  
  <p>and <code>tnsnames.ora</code>:</p>
  
  <pre><code>QSYSTEM =
    (DESCRIPTION =
      (ADDRESS_LIST=
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.110)(PORT = 1530))
      )
      (CONNECT_DATA =
        (SERVER = DEDICATED)
        (SERVICE_NAME = QSYSTEM)
      )
    )
  </code></pre>
  
  <p>where <code>QSYSTEM</code> is the database SID, and <code>192.168.10.110</code> is the address of the host netstat output.</p>
  
  <pre><code>Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
  tcp        0      0 0.0.0.0:50904           0.0.0.0:*               LISTEN      9650/ora_d000_QSYST
  tcp        0      0 192.168.10.110:22       10.48.202.125:63350     ESTABLISHED 2994/sshd: oracle [
  tcp        0      0 127.0.0.1:14468         127.0.0.1:1521          ESTABLISHED 9618/ora_pmon_QSYST
  udp        0      0 127.0.0.1:60990         0.0.0.0:*                           9652/ora_s000_QSYST
  udp        0      0 127.0.0.1:20566         0.0.0.0:*                           9650/ora_d000_QSYST
  udp        0      0 0.0.0.0:21371           0.0.0.0:*                           9646/ora_mmon_QSYST
  udp        0      0 127.0.0.1:58024         0.0.0.0:*                           9618/ora_pmon_QSYST
  </code></pre>
  
  <p><code>lsnrctl status</code> output:</p>
  
  <pre><code>LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 02-MAR-2016 13:57:16
  
  Copyright (c) 1991, 2011, Oracle.  All rights reserved.
  
  TNS-01150: The address of the specified listener name is incorrect
   NL-00303: syntax error in NV string
  </code></pre>
  
  <p>I'm using Oracle 11g Standard on RHEL 7.</p>
  
  <p>Solution:
  When i replaced localhost with IP address and properly changed and formatted <code>listener.ora</code> and <code>tnsnames.ora</code> i've established connection.</p>