Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have now got the client side running fine.
On the server I have a daemon process listening on port 1521 and I want these coming back on 15210, naturally, as that is the port of my client side process.
However if on the 'client' side I run
ssh -R 1521:localhost:15210 user@serverhost
I get a problem as my daemon is already listening on 1521. How do I make sure that my server side port 1521 responses get to my client side 15210 port ?
they don't get to that port, I think you're misunderstanding something. When your client connects to 15120 it establishes a fully stateful TCP session with the remote SQL box, just like if you connected directly to it. No return data needs to be sorted at all.
I am running, on my client machine, a port forwarder interactively :-
**
ssh -v -L 15210:db_server:1521 -N orcl@db_server
oracle@db_server's password:
debug1: Authentication succeeded (password).
debug1: Local connections to LOCALHOST:15210 forwarded to remote address db_server:1521
debug1: Local forwarding listening on 127.0.0.1 port 15210.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on ::1 port 15210.
debug1: channel 1: new [port listener]
debug1: Entering interactive session.
**
I then try to connect to my db_server from the client machine and I get :-
**
debug1: Connection to port 15210 forwarding to db_server port 1521 requested.
debug1: channel 2: new [direct-tcpip]
**
From what I can tell this is about as far as I can get. My server process I know is not receiving any connection requests.
How do I debug the server side ? What are the likely causes of things not working properly ?
on the tunnel, specify 127.0.0.1 instead of the external host name. This name is as resolved by the REMOTE machine, so 127.0.0.1 will be the loopback interface on the server.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
Advertisement
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Click Here to receive a complimentary subscription courtesy of LQ.