Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Re: port forwarding

Subject: Re: port forwarding
Date: Fri, 3 Dec 2004 20:10:33 -0600
It sounds like you're running into Oracle's port redirection... it does 
this by default on Windows servers.  The basic sequence of events is:

  1) Client connects to the database listener.

  2) Listener allocates a dynamic port, and sends back the relevant 
     details... both hostname/IP-address and port number.

  3) Client reconnects to the indicated IP and port.

Step 3 will be where the breakage occurs, as machine r is now trying to 
connect directly to w.  You can address this in either of the following 
ways:

  1) Set USE_SHARED_SOCKET in the registry of machine w.  This is the
     simplest method, as it prevents the redirect from ever occurring. 
     It's adequate in most cases, but has significant side-effects...
     most notably, all remote connections will be dropped if the
     listener is stopped or restarted.

  2) Run Oracle Connection Manager (CMAN) on either machine l or w, and 
     let it handle the redirect (so the client never sees it).  This 
     will require changes to the database connection details, as well as 
     the port you're tunnelling.

If you have access to Metalink (Oracle Support website), just do a 
search on CMAN and/or USE_SHARED_SOCKET and you should find all of the 
necessary details with little trouble.  If not, email me privately and 
I'll try to provide more specific instructions.

On Thu, Dec 02, 2004 at 01:29:46PM +0100, Rainer Lay wrote:
Hi,

I have here a complicated setup for port forwarding. I want to forward a 
port of a oracle database. Three computers are involved:

w: windows machine with oracle installed
r: remote, linux. Here I want to run some oracle tools
l: local, linux. A Box between those two

I want to access the database on w from r. There is no direct connection 
between w and r. I only have a ssh tunnel from r to l.
To establish the connection, I startet a ssh connection to r on l and 
forward port 11523 on r to port 1521 on w:

ssh -v r -R 11523:w:1521 -g -N

Trying to use the oracle tools on r, I cannot get the connection to w.
But it should work. :-)

Accessing the oracle port on w from l directly works without problems. 
So there must be something wrong with the tunnel.

Any ideas what I am doing wrong?

kind regards,
Rainer

Attachment: signature.asc
Description: Digital signature

<Prev in Thread] Current Thread [Next in Thread>