Blog.

How to connect to databases within a VPC network

Cover Image for How to connect to databases within a VPC network

Connect within a VPC

Slik Protect supports backup and restoration for databases that sit within a Virtual Private Cloud (VPC). The Slik Protect infrastructure establishes a private and secure SSH tunnel to your database.

However, in order for Slik Protect to establish a secure connection, you need to —

  1. add the Slik Protect IP address to the allowlist, and
  2. provide the connection credentials (including the SSH keys) on the Slik Protect console.

We support VPC from all cloud providers, and have added steps forAWSandDigital Ocean. Other cloud providers also have similar steps. Please reach out to[email protected]if you face any troubles.

Configure VPC for AWS

Follow the steps below for your Amazon RDS database.

1. Add Slik Protect’s IP Address to the allowlist

To add Slik Protect’s IP address to the allowlist, first navigate to the RDS database instance on AWS. The RDS instance page would look something like —

RDS instance page on AWS.

  1. Go to the “Connectivity & Security”tab and select the configured VPC security group

Connectivity & Security tab for the AWS RDS instance

  1. Go to “Edit inbound rules”** in the selected security group

Inbound rules tab in security group

  1. Add the following IP address to the list of inbound rules.

Note: The connection type is SSH with port 22.

Add the Slik Protect IP address with connection type SSH

2. Get Amazon EC2 instance credentials

Go to the EC2 instance connected to the database above which will have a link similar tohttps://us-west-1.console.aws.amazon.com/ec2/v2/home?region=<region_name>#Instances:v=<instance_count>;instanceId=<instance_id>

  1. Get SSH server pathOnce you select the Instance, got to Networking and copy Public IPv4 address. This will be your SSH server path.
  2. Get SSH Key PairWithin the same detailed view, Go to Details > Instance Details > Key pair name. This will be the key pair used to establish SSH connection with your EC2 instance.Keep this key pair safe.If you wish to create another key pair for connection with Slik Protect, you will have to create a new user and generate new key pair for them. You can follow the guide here for detailed overview.
  • For Amazon Linux 2 or the Amazon Linux AMI, the user name isec2-user.
  • For a CentOS AMI, the user name iscentosorec2-user.
  • For a Debian AMI, the user name isadmin.
  • For a Fedora AMI, the user name isfedoraorec2-user.
  • For a RHEL AMI, the user name isec2-userorroot.
  • For a SUSE AMI, the user name isec2-userorroot.
  • For an Ubuntu AMI, the user name isubuntu.
  • For an Oracle AMI, the user name isec2-user.
  • For a Bitnami AMI, the user name isbitnami.
  • Otherwise, check with the AMI provider.
  1. Get SSH usernameGet username for your EC2 connection. Example, For Amazon EC2 instances, following are the default usernames.
  2. Default port for SSH connection is22
  3. Get SSH port

Configure VPC for Digital Ocean

1. Add Slik Protect’s IP Address to the allowlist

  1. Go to “Networking”tab and under the “Firewalls”tab, select “Create Firewall”.

  1. Under “Inbound Rules”,add the following IP address for Slik Protect to the list of inbound rules.

Note: The connection type is SSH with port 22 and Protocol TCP

Add the Slik Protect IP address with connection type SSH