tags:

views:

153

answers:

2

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.

A: 

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 '^]'.
dpbradley
Thanks, but it does not work for me. I have oracle 10.2 client, and socks proxy setup through ssh -D tunnel. It work for other programs (Firefox,IE) but oracle cannot connect (ORA-12537: TNS:connection closed)
Roman
Can you post the proxy setup and what happens when you telnet to the Oracle listener port?
dpbradley
proxy is done through ssh, "ssh -D 1522 roman@host", telnet connects, but displays nothing. In a test setup I only changed HOST to localhost in tnsnames.ora, and started the proxy.
Roman
proxy is listening on port 1522, and is working, as I set up Firefox (and IE) to use the same proxy
Roman
A: 

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...

Christian