not able to coonect oracle database of linux gnome boxes

Issues related to applications and software problems and general support
Post Reply
nike
Posts: 72
Joined: 2018/05/07 14:05:24

not able to coonect oracle database of linux gnome boxes

Post by nike » 2021/11/30 13:11:59

Sir
i have installed centos7 in centos8 gnome boxes as guest pc. And oracle 11gr2 database has been installed in guest pc( centos 7). database is running fine . but i cannot connect database outside of boxes (guest pc). moreover i can connect samba share file form boxes (guest pc) to outside (host pc) or vice-versa. below boxes (guest pc) ip route output --
[admin@oracle-vm ~]$ ip route
default via 192.168.122.1 dev eth0 proto static metric 100
192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.130 metric 100
[admin@oracle-vm ~]$
AND
HOST PC's ip route output

admin@sys-srv admin]$ ip route
default via 192.168.0.1 dev enp1s0 proto static metric 100
192.168.0.0/24 dev enp1s0 proto kernel scope link src 192.168.0.52 metric 100
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1

oracle client already installed outside guest pc for database connection . From there i connect other oracle database.
So i think it is a network issue but how to solve it ...please help

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: not able to coonect oracle database of linux gnome boxes

Post by TrevorH » 2021/11/30 14:05:44

Did you open the ports in the firewall? man firewall-cmd
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: not able to coonect oracle database of linux gnome boxes

Post by jlehtone » 2021/11/30 14:08:26

I don't know oracle, but other (sql) services have in their default configuration that they do not listen nor accept connections from outside; only from localhost. You can probably connect from the CentOS 7 where you run the db service.

Even if service listens for and allows connections from outside, there is still firewall. The default firewall of CentOS 7 does not allow connections from outside into most services. Oracle's installer probably does not add "allow" rule to firewall; you have to do that too.

If db listens on guest and firewall of guest allows connection, then host should be able to connect; firewall in CentOS 8 does not block outbound connections. (RHEL 9 might offer such option in the future.)

If you want to connect from outside of the host into the guest, then you do need port forwarding on the host. In port forwarding (DNAT) the outside client connects to port of the host and host redirects connection to port in the guest. That requires both DNAT and allow rules in nftables.

However, the virtualization does set some (forwarding and SNAT) rules too and order of rules is critical. It is usually "easier" to remove the host from the router-role and attach the guest directly into the outside subnet (192.168.0.0/24). That is called "bridging" setup.

Post Reply