Accessing oracle database in guest fails

Discussions related to using VirtualBox on Linux hosts.
Post Reply
MickFried
Posts: 1
Joined: 24. Oct 2019, 18:52

Accessing oracle database in guest fails

Post by MickFried »

Host: Fedora 30
Guest: Oracle Linux 8 with installed and running Oracle 18c Database

I am in a corporate vpn and tried to access the database (in guest) with e.g. dbeaver (in host). I actually tried both with the vpn and outside. In the guest I opened port 1521/tcp in the firewall and confirmed that with nmap:

Code: Select all

$ sudo nmap -n -PN -sT -sU -p 1521 localhost
[...]
PORT     STATE  SERVICE
1521/tcp open   oracle
Then I tried the following three configuration options - all without success. I am now lost between VirtualBox, network options, oracle and don't know how to get access.


1.) NAT
Configured forwarding of port 1521. However, from the host a nmap on both ports gives me state "filtered" inside the vpn network and "closed" on the guest outside of the vpn.

Code: Select all

$ nmap 10.0.2.15 -Pn -v -p  1521
[...]
PORT     STATE    SERVICE
1521/tcp filtered oracle
A ssh call from host to guest fails as well.

Code: Select all

ssh: connect to host 10.0.2.15 port 22: No route to host
2.) host-only adapter with allow all
In vpn ssh from host to guest works but nmap against port 1521 gives state filtered. Outside of the vpn even if I switch of the firewall the port 1521 remains closed:

Code: Select all

$ firewall-cmd --state
not running
$ nmap 192.168.56.101 -Pn -v -p  1521
[...]
PORT     STATE  SERVICE
1521/tcp closed oracle
How is that even possible?


3.) Bridged network
In the vpn network the guest doesn't get an ip-adress at all.

Outside of the vpn he does. I can ssh from the host to the guest. But still no connection to the database. nmap gives me "closed" for some reason. Why is that?

Code: Select all

$ nmap 192.168.178.189 -Pn -v -p  1521
[...]
PORT     STATE  SERVICE
1521/tcp closed oracle
Could someone please help me on that? I would like to connect from inside the vpn and outside from the host to the oracle database inside the guest.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Accessing oracle database in guest fails

Post by scottgus1 »

VPNs tend to rule Britannia with an iron fist. No telling what networks will do or not when there's a VPN afoot.

Try all this with no VPN present and see if you can get access. If Virtualbox and no VPN works, but Virtualbox with VPN does not, then your VPN is jamming up Virtualbox. There may still be a way, but we need to confirm the no-VPN situation first.
Post Reply