I have oracle database on my computer that i am accessing through a java program using localhost:1521 more precisely using ojdbc7 and host String as "jdbc:oracle:thin:@localhost:1521:orcl". Everything is working fine but now I want to access same database through another computer with different internet connection. I read that I have to change listener.ora file and add ip address where localhost is.

Now I have tried using ip address of my computer which i have set to in network connection and same in listener.ora file and created a virtual server in my router settings and set this same ip address and port there as well. Still when I try to connect to server computer's Internet IP(not it states "TNS:no listener".

      (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521))

Firewall is off. I have also tried using and creating virtual server for that in router as well but didn't work. Oracle 11g is installed on both server and client's computer.

I have also tried using ip in listener.ora file so it may listen to all ip's but that didn't work as well.

Can someone point me in the right direction.

Edit: Different internet connection means one is my home internet (ip:39.40.xx.1xx) other is my friends home internet (different ip) we live few miles apart and use same ISP. My computer is acting as server which is using Windows 10. Its firewall is disabled. I am assuming that my friend would use my internet IP address which would be forwarded to my computer (

  • What does "different internet connection" mean? Are these two computers on the same network segment? Or are you trying to connect across a NAT? You've given two local IP addresses but I'm not sure whether those are local addresses in the same network segment or different network segments. What firewalls (hardware and software) are in place? If they are on the same network, I would expect that one of the two systems has a firewall that prevents the connection. Commented Sep 15, 2016 at 20:45
  • Based on a recent edit request it appears as if you have created a duplicate account. If this is true please merge your accounts and you will be able to freely edit your question and comment on it.
    – Erik
    Commented Sep 15, 2016 at 21:57
  • Thank Erik, Thanks Justin for the reply... I have edited the question to make it more clear about what i mean by different internet connections and firewall.. I want my computer's Oracle database to be accessed by someone over the internet which may or may not be provided by same ISP and things i have tried to make it work are in question. I have used server computer's public ip to connect... public ip(provided by ISP): 39.40.29.xxx server computer network conn IP and listener setting ip: Commented Sep 15, 2016 at 22:19
  • If edit is not approved here it is: Edit: Different internet connection means one is my home internet(ip:39.40.xx.1xx) other is my friends home internet(different ip) we lvie few miles apart and use same ISP..(my computer is acting as server)which is using windows 10 its firewall are disabled..I am assuming that my friend would use my internet ip address which would be forwarded to my computer( Commented Sep 15, 2016 at 22:20
  • I would be very surprised if your ISP allowed connections on arbitrary ports between computers on your network and computers on your friend's network. If it did, you would need a public IP address-- the two IP addresses you posted are local, neither would be addressable from the other person's network. Commented Sep 16, 2016 at 6:50

1 Answer 1


Presuming port forwarding and network items are working as expected (can be checked with telnet host 1521).

Make sure that you restart the listener service.

Also connect to the database from your local machine and run the following commands:



Outside of that it looks good from a listener config side.

  • Thank You!! i checked portforwarding through www.canyouseeme.org as well as my friends computer it was successful...and made these changes you stated and now everything is working fine.. Commented Sep 16, 2016 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.