Showing posts with label cloud. Show all posts
Showing posts with label cloud. Show all posts

Tuesday, 13 June 2017

SSH Tunnel to AWS RDS in Private Subnet



SSH Tunnel to RDS


We needed to connect to an RDS DB in the Amazon cloud that is not publicly accessible. Normally we  would connect through an ec2 instance but as this is time consuming and gets quite annoying we looked  at setting this up so we could simply connect via
sqlplus user/pass@tns

How to implement

1. Set up the SSH Tunnel
ssh -N -L 1521:your.rds.endpoint.rds.amazonaws.com:1521 sshuser@yourserver.com
 -N   
only set up the tunnel
 -L   
set up the forwarding
 1521
that first number is the port on your local machine
your.rds.endpoint.amazonaws.com
The name of the rds endpoint
1521
the port on the remote computer
sshuser@yourserver.com
how you log in to your ec2 instance
2. Set up a new tns entry for the tunnel connection
ORACLE-AWS =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL)
    )
  )

2. Use the SSH Tunnel
sqlplus user/pass@ORACLE-AWS
This lets you connect to the remote rds instance. Note that you have to use the host here 127.0.0.1 explicitly and that it is not the host you set up earlier. This is because it is now forwarding all of the requests. That’s all.
To be clear on how the ports work, here is another example
ssh -N -L 1234:your.rds.endpoint.rds.amazonaws.com:1521 sshuser@yourserver.com
ORACLE-AWS =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL)
    )
  )
This states that forward from port 1234 on my computer to port 1521 on the remote instance. 

Wednesday, 26 November 2014

Review: CloudHQ Its time to get your house in order.

I'm sure there are plenty of people out there like me with cloud storage fragmented across multiple services like Dropbox, Google Drive and Onedrive.  Today I decided to find a solution to migrate or at least sync between them all. After researching whats out there I have decided on keeping the other services instead of just using one cloud storage to rule them all! My preference was for Google Drive however I realized that some of the apps I use have great Dropbox support and people who I share with during my workday also use things a variety of different sources. So I have found a way that I can keep all my current cloud offerings and even encourages me to sign up for more!

CloudHQ makes it simple to keep all my cloud storage sources in sync and allows me to have the flexibility of using a plethora of providers and unlocks a world of third party apps that are now at my fingertips.

I signed up for a free trial by simply downloading the app from the chrome web store but you can just as easily sign up by visiting their  website. 



From here you can select the services you want to sync. For me it was Dropbox, Google Drive, Onedrive and Evernote. It also has a good offering of others that im not currently using such as Basecamp, SugarSync, Box and salesforce.

You can decide on two way or one way synchronization. I choose to replicate all of my accounts so I can have total freedom to choose what services I use.
You also have the choice to convert any documents into Google Docs gdoc format when syncing. You can choose to sync all or specific folders from each account.

Once you are set up and running your first sync will take place.
The chrome extension is great and gives you an in browser pop up of you sync status.


I had a good look around and this was by far the best service of its kind out there. It is just so compatible with so many services that I cannot fault it. 

Key features are 

    • Manage all of your cloud storage accounts from a single interface.
    • 100% Web based
      • No extra installer to put an icon in your sys tray and add an extra 5 minutes of startup time to your computer.
      • Ideal for linux users
    • Can share files with whoever you work with using their preferred storage solution
    • Combine as many free storage providers as you can get your hands on into one place
    • webdav also available.
There is a free plan that you can use to see the benefits and they offer various pain plans for additional functionality.