I have an Oracle Linux 6.4 with Oracle 12c running on a Virtual box with NAT and bridged network running on an OSX host. A second guest is a Debian Linux with NAT and bridged network. I'm trying to access the database on the Oracle vb listening on port 1521 from the Debian vb. I tested the connection from the host to the Oracle guest via NAT port forwarding with success (forwarded on which I received from NAT DHCP). I am stuck trying to connect from the Debian vb. Initially, I thought a NAT port forwarding from the Debian vb to the Oracle vb would be the way to go, but since they have assigned by default the same ip (, I wonder what I should do. Basically I would like the port 1521 to be forwarded to the Linux vb. How would I go about doing that?


You mean both guest have the same address? If so you need to fix this first: make sure you don't use the same MAC address on both guests.

Also, if both guests are using a network interface (NAT or not) in same subnet, you should even not need any port forwarding between them.

  • ok i will check that. meanwhile i successfully connected via ssh tunnel. – setcookie Sep 4 '14 at 7:14
  • 1
    @tonioc, with the "NAT" network type, the guest always gets It doesn't matter, because each guest's NAT network is isolated from the others. – Kenster Sep 6 '14 at 22:51

You say both of the guests have a bridged connection as well as NAT? This is kind of an odd arrangement. Having a bridged connection makes the NAT connection redundant, because the guest should be able to talk to the rest of the world through the bridged connection.

I'm saying this because, if both of the guests have bridged connections, then they should be able to communicate with each other (and the host) through those. The NAT connections ought to be unnecessary.

If you can't or don't want them to communicate through their bridged links, then the most reasonable thing would be to set up an internal or host-only network, and connect both of the guests to that. An internal network or host-only network is a virtual LAN maintained by Virtualbox. You can attach a guest's network interface to it, and the guests can communicate with each other. Virtualbox supports running a DHCP serve on the network, if you like. The difference between an internal network and a host-only network is that the host also gets an interface to host-only networks, so the host and guests can communicate with each other.

Here is the Virtualbox manual section on Internal networks. The section on host-only networks follows right after it.

  • good explanation. i basically tried severall things and started first with NAT an port forwarding for a host to guest database test. i will check what will happen when i disable NAT. thanks – setcookie Sep 9 '14 at 7:17

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.