I have oracle database instance up and running on vmware player on Redhat linux(Guest OS). This virtual machine is running on on windows 7 computer(Host OS). I am able to connect to the database instance running on vm using sql developer which is running on my windows7 computer.

But when I try to connect to this database instance from my mac os, sql developer running on mac os can not connect to this database instance.

but , I am able ping my windows7 ip address from my mac os,

I am able to telnet port 80 on my windows7 computer from mac computer.

But I am unable to telnet port 1521 from the mac os.

Could anybody help me to configure my macos and windows7 computers to connect to database instance which is running on vmware player.

Thanks in advance for any help

Edit 1: Following is the output from netstat -an |grep 1521 from redhat linux virtulal machine instance

[ora112@localhost ~]$ netstat -an|grep 1521
tcp        0      0      *                   LISTEN
tcp        0      0                 ESTABLISHED
tcp        0      0                 ESTABLISHED
unix  2      [ ACC ]     STREAM     LISTENING     17671  /var/tmp/.oracle/sEXTPROC1521

Following output is from windows7 pc

$ netstat -an|grep 1521
  TCP              LISTENING
  TCP    [::1]:1521             [::]:0                 LISTENING

Ip configuration on windows7 computer

 Connection-specific DNS Suffix  . :
 Link-local IPv6 Address . . . . . : fe80::94b0:30a1:5c95:2e75%12
 IPv4 Address. . . . . . . . . . . :
 Subnet Mask . . . . . . . . . . . :
 Default Gateway . . . . . . . . . :

Ip configuration on macos computer

    ether e4:ce:8f:32:37:f6 
    inet6 fe80::e6ce:8fff:fe32:37f6%en1 prefixlen 64 scopeid 0x5 
    inet netmask 0xffffff00 broadcast
    media: autoselect
    status: active

ip configuration on my vmware instance

[ora112@localhost ~]$ /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:C4:D3:5C
          inet addr:  Bcast:  Mask:
          RX packets:1938 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1222 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:219505 (214.3 KiB)  TX bytes:163937 (160.0 KiB)
  • 1
    Couple of questions. Overall good 1st post. Is the database listening only on the interface or is it listening on either your VMs ip address or (all). You can confirm with the command netstat -an and look for something listening on port 1521.
    – slm
    Dec 30 '12 at 14:15
  • I have updated the question with the output for netstat -an|grep 1521 command
    – KItis
    Dec 30 '12 at 15:35

Check what network configuration you are using in your guest. You'd probably rather use bridged mode to get the guest on its own IP address.

Check the firewall on your guest isn't blocking and the Oracle listener to make sure it's bound to the IP address.

  • on my vmware instance, i am using NAT
    – KItis
    Dec 30 '12 at 16:01
  • Your answer solved my problem. I changed the the network configuration on my virtual machine to Bridge Mode. But I would like to understand what difference it make based on which network configuration i am using. Could you direct me to a source where i can get more knowledge on NAT, Bridge and hostonly configuration
    – KItis
    Dec 30 '12 at 16:23
  • Chapter 7 of this document vmware.com/pdf/vmware_player40.pdf is pretty good. Dec 31 '12 at 0:41

I assume the problem is that you're using an internal network (hostonly or other stuff like that) on your windows7 pc, e.g. a subnet for that while your normal local subnet is

So what you need to do is to implement a traffic redirection / forwarding on the windows7 pc for this specific port to the vm to your database instance. Doing this on windows where nothing comperable to the unix tools like netfilter/iptables exists seems like quite a hard job to me. My only idea would be to try your luck with netsh but there are good chances that things become worse.

A more easier way would be to bridge an existing network interface (maybe you have more than one at your windows7-pc?).

  • Yes, as you said, I am using internal network. I have updated the question with my ip configuration
    – KItis
    Dec 30 '12 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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