Solved

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

Posted on 2008-10-04
2
1,508 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
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This is an article about my experiences with remote access to my clients (so that I may serve them) and eventually to my home office system via Radmin Remote Control. I have been using remote access for over 10 years and have been improving my metho…
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
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 information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now