Posts

Showing posts from 2018

Accessing a Private hosted application via Public/Bastion instance [AWS]

Image
Let's say you have an application which you have deployed in your Private subnet in AWS and you want to access that application via your Bastion instance / Browser. 1. Assuming that you already have deployed the application on one of your Private Subnet EC2 instance. 2. If deployed correctly, that application should be accessible via http://PRIVATE_IP:PORT/ but since your private instance doesn't have internet access and you cannot directly connect to it. We will use an alternative to it. So to achieve this we will set-up an SSH tunnel and then use it to connect to our application via any Browser. $ ssh -N -R LOCAL_PORT:REMOTE_APP_HOST:REMOTE_APP_PORT USER@LOCAL_HOST -i KEY.PEM Man entry for -R flag: -R [bind_address:]port:host:hostport -R [bind_address:]port:local_socket -R remote_socket:host:hostport -R remote_socket:local_socket Specifies that connections to the given TCP port or Unix socket on the remote (server) host are to be forwarded to the gi

Introduction to GIT

We can do a lot with  git , before trying anything on PROD machines make sure to play with  git  on your local machine or test machine. Prerequisites => Install git. => Be familiar a bit with the command line. => Play with the repository. Install git => yum install git -y Configure user/email => git config --global user.name "Sunny Bhambhani" => git config --global user.email "bhambhani147@gmail.com" => git config -l user.name=Sunny Bhambhani user.email=bhambhani147@gmail.com Initializing a new git repo => pwd /root/git-test => git init Initialized empty Git repository in /root/git-test/.git/ A new hidden directory called .git will now be present in your project directory. This is where Git stores its database and configuration information so that it can track your project. Cloning a repository => pwd /root => git clone  https://github.com/bhambhani147/TT-Help.git Cloning into 'TT-H