Solved

Need step by step to Tunnel to an Oracle DB using Putty

Posted on 2008-10-04
2
1,524 Views
Last Modified: 2013-12-19
Hi to all.
I appreciate that you can provide me detailed instructions to perform the following:
From home, I use the SafeNet Secure VPN Client to access my work.
Once connected, I have to ssh to a box (let's call it 192.168.2.29), and once connected to that box, I have to ssh to another box that has the DB Server (192.168.1.28).
There is any way to use my LOCAL sqlplus on my PC to access directly to the DB Server using Putty Tunnel option?
So basically I'd like to access the DB Server directly from my PC (if possible).

Any help is appreciated
0
Comment
Question by:Diepafu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Expert Comment

by:Haris Djulic
ID: 22641961
here is the link which gives you the step by step...

http://www.macan.com/Putty/Tunneling_with_PuTTy.html

you just need to enter you remote host (DB server IP and oracle port 1521) and your local port example 51521 or any you like...

after that you need to edit you oracle tnsnames file and instead of ip adres of your database put localhost and the port you chose for your local port..

after that after putty connects to the DB server you can use you loacl sqlplus...

if you need additional explanation let me know...
0
 

Accepted Solution

by:
Diepafu earned 0 total points
ID: 22703032
This are the steps that I performed:
- Open PuTTY and load your saved session.
- Choose Tunnels in the category section. Then in the "source port" section, put any port number that is not in use (example: 1234).
- In the destination text box enter the IP address of the host name (192.168.1.28 in my case) followed by a colon and the destination port number(1521).  Remember to click on the ADD button.
- Save your settings in PUTTY.
- Then modify your tnsnames.ora with something like this:
CCOM_PROD =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1234))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = CCOM)
    )
  )

- Then ssh to the 1st server
- Finally type the following to connect and create the tunnel to the second server:
ssh -L 1234:192.168.1.28:1521 oracle@192.168.1.28
0

Featured Post

Supports up to 4K resolution!

The VS192 2-Port 4K DisplayPort Splitter is perfect for anyone who needs to send one source of DisplayPort high definition video to two or four DisplayPort displays. The VS192 can split and also expand DisplayPort audio/video signal on two or four DisplayPort monitors.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Secure VPN Connection terminated locally by the Client.  Reason 442: Failed to enable Virtual Adapter. If you receive this error on Windows 8 or Windows 8.1 while trying to connect with the Cisco VPN Client then the solution is a simple registry f…
I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question