Oracle through proxy (squid proxy) - oracle

Can I connect to oracle server via proxy. I have a squid proxy running and I am trying to connect to my oracle machine via the squid proxy. This is due to the fact the oracle server is not directly accessible via my machine. Is this possible? Or is there any other way accessing oracle via a different machine?

Squid is a web proxy so, not surprisingly, it doesn't support the protocol an Oracle client uses to connect to an Oracle database. You can't use squid as a database proxy.
Oracle Connection Manager can be used as a proxy for database connections. You can install that on a server that your client has access to and that has access to the database server and then connect to the database via Connection Manager. Some firewalls have built-in support for proxying Oracle database connections as well.

Related

How can I connect Entity Framework to an Oracle DB through an SSH tunnel?

I'm trying to connect to an Oracle DB from Entity Framework, but the DB rejects direct connections from the PC. I need to connect through a jump server / gateway.
Here's what's working:
From the gateway server I can connect to the DB using both sqlplus and EF. The gateway has a ssh server.
From the local PC I can start an ssh session on the gateway server (and from the ssh session I can continue with connecting to the DB using sqlplus).
This question is similar, but doesn't work (I get timeouts):
How can I connect to Oracle Database 11g server through ssh tunnel chain (double tunnel, server in company network)?
In particular, when I run plink -N -L localport:dbserver:dbport yourname#connectionserver locally on the PC, I get "session granted", but when connecting with EF from the PC, the connection request gets time out. In that case I use the gateway server as DataSource.
I've checked firewall settings, and port 1521 is open on both PC and gateway server.
UPDATED INFO:
When, instead of using ssh port forwarding on the gateway, I use socat tcp-listen:1521,reuseaddr,fork,tcp:<db_server:port> as port forwarding (on the gateway), I get a response with tnsping <gateway_server> on the local PC.

JMeter-JDBC Connection error

While running an SQl query in JMeter using JDBC request, I'm getting:
SQL ConnectionException:Cannot create Poolable Connectionfactory
(IO error:Network Adapter could not establish the connection).
Installed Oracle11g in virtual machine.
Please give me solution.
Thanks in Advance.
Make sure you have Oracle JDBC driver somewhere in JMeter Classpath
Make sure you have configured network adapter in the virtual machine in Bridge mode (not "host-only", not "NAT") so the virtual machine would have its own IP address.
Make sure port 1521 (or whatever is used by Oracle) is not blocked by OS firewall. Check if you are able to connect to the port using i.e. telnet client
Add JDBC Connection Configuration test element and provide JDBC url of your Oracle instance along with credentials there.
See The Real Secret to Building a Database Test Plan With JMeter guide to learn more about setting up JMeter for databases load testing

When to use Web Server (Oracle HTTP Server) in front of Weblogic

At work there is a legacy system on which a HTTP server (ohs) is used in front of an Oracle Weblogic Server for forwarding SSL connections.
Since Weblogic allows SSL connections to the web service, why/when is a Web Server needed in front of Weblogic; apart from the load-balance scenario?

SOA suite with Remote DB server

I have the Oracle client, weblogic and the SOA suite 11g installed on a Win 7 machine. The Oracle DB is on a server 2008.
I have the hardest time connecting to it. The server name is S2008 on port 1521. I used the RCU to install the schema.
I am able to ping the server. Could someone please help me out in getting this connected? I have not done this configuration before.
Thank you.
This is more of a database concern, not WebLogic.
The simplest thing to do is to confirm you can telnet to port 1521 from the WebLogicmachine (telnet 1521). If this cannot connect, it is either a firewall issue or the TNS listener is not running on port 1521. Check to make sure that port 1521 is opened on the Database host and then try again.
Also, try connecting outside of WebLogic to remove a variable from the problem. This would be easier/faster anyway. Try using SQL developer to connect to the host/port where the database is running. This will show you the ORA-????? error(s) for the connection attempts without having to go through the connection wizard in the weblogic console

connect to oracle through socks proxy

My application (linux and windows) connects to oracle through OCI interface. Is it possible to connect to oracle through socks proxy? or some other similar proxy method? Simple ssh tunnel is not enough as I need to access multiple services (including oracle) through single port.
Edit: I have tried configuring the proxy as suggested in the answer, but it did not work. And I could not find anywhere information, that oracle can work through socks5 proxy.
I got the same issue to get solved. Anyway the solution above cannot work. You need to tell the client to just USE the proxy for connection initialization, but the target to connect to is supposed to be the oracle database server IP and port. Other forums read there is no such possibility via tnsnames.ora. But you're supposed to be able to achieve that using the Connection Manager. Haven't found out yet how to even download and install it though...
As I see Oracle doesn't support socks proxy.
To work around this for my self I did following:
Install proxifier www.freecap.ru
Start PL/SQL Developer from freecap
As I can see - this method not always work.
PL/SQL Developer was able to connect to database only on 3-4 try.
But after successful connect - it's seems stable enough for work.
Second option - is to use Java based tools like SQL Developer.
For Java there is system options for using SOCKS5 out of the box.
-DsocksProxyHost=localhost
-DsocksProxyPort=8081
there is official doc about SOCKS in java
Yes, this is possible. Your client tnsnames.ora file (or EZConnect string) should specify the proxy host as the database host, and the proxy listening port as the port. The SERVICE_NAME or SID is whatever the SQL*Net listener on the other side of the proxy is expecting.
[Edit]
If your proxy host is listening and forwarding on 1522, you should be able to:
telnet proxyhost 1522
and see:
Trying xx.xxx.xx.xxx...
Connected to proxyhost.domain.
Escape character is '^]'.

Resources