<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pranjal-Agrawal</title>
    <description>The latest articles on DEV Community by Pranjal-Agrawal (@pranjalagrawal).</description>
    <link>https://dev.to/pranjalagrawal</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F866047%2Fd31de778-e05b-4c85-90dd-dff4257522e7.png</url>
      <title>DEV Community: Pranjal-Agrawal</title>
      <link>https://dev.to/pranjalagrawal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pranjalagrawal"/>
    <language>en</language>
    <item>
      <title>Docker Port Expose</title>
      <dc:creator>Pranjal-Agrawal</dc:creator>
      <pubDate>Wed, 13 Jul 2022 08:51:46 +0000</pubDate>
      <link>https://dev.to/pranjalagrawal/docker-port-expose-2mk</link>
      <guid>https://dev.to/pranjalagrawal/docker-port-expose-2mk</guid>
      <description>&lt;p&gt;Hi Readers, &lt;strong&gt;Docker&lt;/strong&gt; is an open source platform adopted widely to ease the developing, shipping, and running applications. Docker has a object named containers isolates the applications from the infrastructure and avoids any external affect on the development environment.&lt;/p&gt;

&lt;p&gt;In this blog we will see some network part of containers.&lt;/p&gt;

&lt;p&gt;We will see how to enable communication of the container to the outside world or to the other containers.&lt;/p&gt;

&lt;p&gt;We do this by exposing ports and mapping these ports.&lt;/p&gt;

&lt;p&gt;Let’s see how we can do that.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Login into the AWS account and create one Linux Instance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CXdwi8Ls--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/coyarb717l0bwjoz5h8j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CXdwi8Ls--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/coyarb717l0bwjoz5h8j.png" alt="Image description" width="880" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ssh into the instance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FOErz_47--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fp42ajt8fonp4rp5fczc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FOErz_47--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fp42ajt8fonp4rp5fczc.png" alt="Image description" width="880" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run these commands &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;sudo su&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;yum update -y&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Install the Docker &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;yum install docker -y&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HqyOBdKz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vivadby4zhcbzdh7l0c2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HqyOBdKz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vivadby4zhcbzdh7l0c2.png" alt="Image description" width="880" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Start the Docker service&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;service docker start&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now our base machine is ready.&lt;br&gt;
We will create a server named as demoserver with port(publish) 80 expose map the host port no 80 with container port no 80.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;docker run -td --name demoserver -p 80:80 ubuntu&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--q1qAPqqt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/30q978akof2bpgk8up78.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q1qAPqqt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/30q978akof2bpgk8up78.png" alt="Image description" width="804" height="233"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check the running containers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;docker ps&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To get the details of the port we have exposed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;docker port demoserver&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Execute the container and go inside the container by starting a new process.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;docker exec -it demoserver /bin/bash&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;apt-get update&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VO_lRO3O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f2xz70qerzupjqvnueok.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VO_lRO3O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f2xz70qerzupjqvnueok.png" alt="Image description" width="811" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;apt-get install apache2 -y&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gAD-MzWH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8tugj6knaexn009nalwt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gAD-MzWH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8tugj6knaexn009nalwt.png" alt="Image description" width="880" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then move to this path and create an index.html file&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;cd /var/www/html&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;echo "HELLO WORLD"&amp;gt;index.html&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now start the apache2 service&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;service apache2 start&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Copy the public IP of the instance &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oaE-TGRo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pbnxujwoq8l84tplchd6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oaE-TGRo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pbnxujwoq8l84tplchd6.png" alt="Image description" width="880" height="239"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And run on the browser now &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gkOMaNX9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hunzfwkh1xbmvb8q7su5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gkOMaNX9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hunzfwkh1xbmvb8q7su5.png" alt="Image description" width="880" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The contents of the index file is now visible.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Docker Volume and how to share it.</title>
      <dc:creator>Pranjal-Agrawal</dc:creator>
      <pubDate>Tue, 12 Jul 2022 10:12:58 +0000</pubDate>
      <link>https://dev.to/pranjalagrawal/docker-volume-and-how-to-share-it-19ip</link>
      <guid>https://dev.to/pranjalagrawal/docker-volume-and-how-to-share-it-19ip</guid>
      <description>&lt;p&gt;&lt;strong&gt;Docker&lt;/strong&gt; is a common containerization solution that offers a user-friendly interface. It allows you to deploy your application as a lightweight process set rather than a complete virtual machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker Volume:-&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A Docker volume is an independent file system entirely managed by Docker and exists as a normal file or directory on the host, where data is persisted.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Volume is simply a directory made inside our container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Even if we stop the container still we can access volume.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We can declare a directory as a volume only while creating container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cannot create volume for existing container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can share the volume across any number of containers.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Benefits of Volume:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Decoupling container from storage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Share it among different containers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On deleting the container the volume does not get deleted.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can map volume in two ways:-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Container &amp;lt;-&amp;gt; Container&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Host &amp;lt;-&amp;gt; Container&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Created an EC2 Instance-&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OEGQnuA8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w3ik4pcn0wfluyn30yaz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OEGQnuA8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w3ik4pcn0wfluyn30yaz.png" alt="Image description" width="880" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then ssh into the instance-&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--idTNjWN4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/blc37qly509svc7g4evq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--idTNjWN4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/blc37qly509svc7g4evq.png" alt="Image description" width="880" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;CREATING VOLUME FROM DOCKER FILE AND MAPPING IT TO ANOTHER CONTAINER:-&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;sudo su&lt;/p&gt;

&lt;p&gt;yum update -y&lt;/p&gt;

&lt;p&gt;Install the Docker:-&lt;/p&gt;

&lt;p&gt;yum install docker -y&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JiOpliGB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6o0jm8o028nvwqs0n6ct.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JiOpliGB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6o0jm8o028nvwqs0n6ct.png" alt="Image description" width="880" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create a Docker file:-&lt;/p&gt;

&lt;p&gt;vi Dockerfile&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xLCbhwHY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0trf4hbyfqpto9y28kkb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xLCbhwHY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0trf4hbyfqpto9y28kkb.png" alt="Image description" width="880" height="267"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Write the following inside the Dockerfile&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wOKj5NVB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kqna4nbja15ejo6781xl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wOKj5NVB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kqna4nbja15ejo6781xl.png" alt="Image description" width="861" height="313"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then create the image from this Dockefile:-&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oJM0laL0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eu27bo7diwh45iufhfl7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oJM0laL0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eu27bo7diwh45iufhfl7.png" alt="Image description" width="880" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now create a container with the name cont1 from the image and run:-&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0XU15oiu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zgzy8zc00olm4og0z0pj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0XU15oiu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zgzy8zc00olm4og0z0pj.png" alt="Image description" width="642" height="169"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create some files in it:-&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zMngpZl1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ipphm2hq01ozdrwnu1y0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zMngpZl1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ipphm2hq01ozdrwnu1y0.png" alt="Image description" width="880" height="286"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now to share the volume with another container, create a container with a name cont2:-&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xjrz5ryF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xafl211zh3oupf3muavx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xjrz5ryF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xafl211zh3oupf3muavx.png" alt="Image description" width="852" height="201"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating the cont2, the volume from cont1 would be visible and any changes made in that volume will be visible to both the containers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nHjgKTF1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/repaemi7vghv0ulf6k1o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nHjgKTF1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/repaemi7vghv0ulf6k1o.png" alt="Image description" width="880" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XQKjZUhR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/25ejm4s3p8er41a2pnm0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XQKjZUhR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/25ejm4s3p8er41a2pnm0.png" alt="Image description" width="880" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_CREATING THE VOLUME USING COMMAND:-&lt;br&gt;
_&lt;br&gt;
Create a new container with name cont3&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NNzJ0GOT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1f6xsdby9e3pnlwhnvru.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NNzJ0GOT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1f6xsdby9e3pnlwhnvru.png" alt="Image description" width="680" height="154"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create a new container with the name cont4 and share the volume with it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fxwe1Mqx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h0t7y7cnaxrjii82khyw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fxwe1Mqx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h0t7y7cnaxrjii82khyw.png" alt="Image description" width="880" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create some files inside it and see its present in both the containers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--G8ahdvG1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/txhbvc67c8r3hq9419wu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G8ahdvG1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/txhbvc67c8r3hq9419wu.png" alt="Image description" width="880" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SHARING VOLUME HOST &amp;lt;-&amp;gt; CONTAINER:-&lt;/p&gt;

&lt;p&gt;Verify the files in the /home/ec2-user and run the following command -&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Oe-2G2J---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wz7nee24yomi2up8eipw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Oe-2G2J---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wz7nee24yomi2up8eipw.png" alt="Image description" width="880" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go to that directory and do ls &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RFu73pHF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hirkavl09s4zo8gq04t1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RFu73pHF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hirkavl09s4zo8gq04t1.png" alt="Image description" width="880" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create some files in the container in that particular directory &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HKcLQvbk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6mqyhxrpvikyj6usojvi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HKcLQvbk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6mqyhxrpvikyj6usojvi.png" alt="Image description" width="880" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now check in the EC2 host machine and we can see the files we created now.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--31tn15tE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d96xtw5vjamrisrforq8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--31tn15tE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d96xtw5vjamrisrforq8.png" alt="Image description" width="327" height="102"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Docker Swarm in AWS (set up)</title>
      <dc:creator>Pranjal-Agrawal</dc:creator>
      <pubDate>Sun, 29 May 2022 11:22:17 +0000</pubDate>
      <link>https://dev.to/pranjalagrawal/docker-swarm-in-aws-set-up-5eek</link>
      <guid>https://dev.to/pranjalagrawal/docker-swarm-in-aws-set-up-5eek</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is a Swarm?&lt;/strong&gt;&lt;br&gt;
Docker Swarm is a cluster management and orchestration tool that makes it easy to scale and manage your already existing docker services. A swarm consists of multiple Docker hosts that run in the so-called swarm mode and act as managers (managing member relationships) or as workers (run the services). A given Docker host can be a manager, worker or can perform both roles.&lt;br&gt;
When creating a service in a swarm you define the optimal state of your service (number of replicas, ports of the service, network and storage resources, and more). Docker will try to maintain this desired state by restarting/rescheduling unavailable tasks and balancing the load between different nodes.&lt;br&gt;
&lt;strong&gt;Managers Nodes:&lt;/strong&gt;&lt;br&gt;
Manager nodes distribute and schedule incoming tasks onto the Worker nodes, maintain the cluster state and perform orchestration and cluster management functions. Manager Nodes can also optionally run services for Worker nodes.&lt;br&gt;
&lt;strong&gt;Worker Nodes:&lt;/strong&gt;&lt;br&gt;
Worker nodes are also instances of the Docker Engine whose sole purpose is to execute containers and services as instructed by the Manager Nodes.&lt;/p&gt;

&lt;p&gt;Steps To Host A Website In Docker Container And Managing It Using Docker Swarm. &lt;/p&gt;

&lt;p&gt;Launch 4 Ec2 instances with tags as Master, Worker-1 , Worker-2,Worker-3.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ooh5BIGJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5dsz29thjzonlmb91vyq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ooh5BIGJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5dsz29thjzonlmb91vyq.png" alt="Image description" width="628" height="163"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Connect To Servers using the Xshell  and initialize Docker. &lt;br&gt;
Command yum install docker* -y&lt;br&gt;
Command to start docker is- systemctl start docker&lt;br&gt;
Command to enable docker is :- systemctl enable docker&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fBmGaaTO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kxehvn97mo4suesb5yn7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fBmGaaTO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kxehvn97mo4suesb5yn7.png" alt="Image description" width="628" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xy7lRUWR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z7t1gomcnpzxnuymrrt8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xy7lRUWR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z7t1gomcnpzxnuymrrt8.png" alt="Image description" width="628" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Initialize Docker Swarm into your instances.&lt;br&gt;
Command to initialize docker Swarm :- docker swarm init&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Mlw3FkDG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8kuq7fn9eop2pzkehtwd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Mlw3FkDG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8kuq7fn9eop2pzkehtwd.png" alt="Image description" width="628" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--E3LgmSsT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3zknbqbgs1qrm11xhdml.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E3LgmSsT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3zknbqbgs1qrm11xhdml.png" alt="Image description" width="627" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, a token will be shown . Copy this token and paste it in the other nodes. Now the other nodes will become the Worker nodes.&lt;/p&gt;

&lt;p&gt;You can check the joining status of the nodes by using the command  docker node ls  in the Master Node.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dJlA6t_z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bg0yg9esp61d9xwltpts.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dJlA6t_z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bg0yg9esp61d9xwltpts.png" alt="Image description" width="628" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;write the docker file to carry out the following functions. And Docker file should written into the VI Editor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zUO_8qjV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/022m471glnzn57mgq35r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zUO_8qjV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/022m471glnzn57mgq35r.png" alt="Image description" width="628" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy and run the same Docker file into the worker node's as it will be helpful in building the image of the same Docker Container into the worker node's also.&lt;br&gt;
Save the docker file into the VI Editor and run the following to command to build  the image of the docker container into the master node.&lt;/p&gt;

&lt;p&gt;Build the image by command -&lt;br&gt;
docker image build -t appimage:1 .&lt;br&gt;
You can check the image by using the command - &lt;br&gt;
docker image ls&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8UAeleT5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eln2djyumqhkz9tk0hjl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8UAeleT5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eln2djyumqhkz9tk0hjl.png" alt="Image description" width="628" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, you have to run the services from the Master Node  command docker service create --name #name_of_the_service -p 80:80 #any_name_of_image:1&lt;/p&gt;

&lt;p&gt;Check the service id using command docker service ls .&lt;br&gt;
Note this service ID.&lt;br&gt;
Create the containers using command: docker service scale #service_id = 4(you can give any number of container).&lt;br&gt;
The containers are randomly deployed on any one the Master or Worker nodes.&lt;br&gt;
Docker Swarm also provides the Load Balancing features thus providing maximum availability.&lt;/p&gt;

&lt;p&gt;Finally, your docker swarm is configured and ready.&lt;br&gt;
When you hit the IP of any worker or the master node, you will be able to view your site mapped.&lt;/p&gt;

&lt;p&gt;(This is the sample site I have downloaded from internet and httpd into my EC2 master instance).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BZ2VhxpV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/39s0ifd0d5lcc8dgj156.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BZ2VhxpV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/39s0ifd0d5lcc8dgj156.png" alt="Image description" width="628" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Complete OpenVPN setup in AWS</title>
      <dc:creator>Pranjal-Agrawal</dc:creator>
      <pubDate>Sun, 22 May 2022 07:14:50 +0000</pubDate>
      <link>https://dev.to/pranjalagrawal/complete-openvpn-setup-in-aws-24ma</link>
      <guid>https://dev.to/pranjalagrawal/complete-openvpn-setup-in-aws-24ma</guid>
      <description>&lt;p&gt;Accessing your public EC2 instances using SSH and encrypting is fine. But what about working with AWS-based data that’s not public? There are all kinds of reasons why admins keep such resources out of reach of the general public. But if you can’t get at them when you need, what good are they likely to do you?&lt;/p&gt;

&lt;p&gt;The OpenVPN Access Server&lt;br&gt;
As the name suggests, OpenVPN is an open source project, and you’re always able to download the free community edition and set things up on your own VPN server. But the OpenVPN company also provides an OpenVPN Access Server as an EC2 AMI .&lt;/p&gt;

&lt;p&gt;What does it cost? &lt;br&gt;
If you’re only testing things out and don’t plan to access the VPN using more than two connections at a time, then the AMI itself is free.&lt;/p&gt;

&lt;p&gt;First of all we are deploying a Linux AMI instance with disabled Auto-assign Public IP.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8tygczjZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3npi32j64huyyk9a5d92.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8tygczjZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3npi32j64huyyk9a5d92.png" alt="Image description" width="628" height="184"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We will be unable to ssh into it as it has no public IP assigned (as shown in the picture below).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Md7KnUfI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lv92e5xt8juwqds8ds7a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Md7KnUfI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lv92e5xt8juwqds8ds7a.png" alt="Image description" width="628" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Launching an OpenVPN Access Server&lt;/p&gt;

&lt;p&gt;OpenVPN Access Server AMIs available from the AWS Marketplace.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z8oj3DS_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b92s38sh4gav830eigcm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z8oj3DS_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b92s38sh4gav830eigcm.png" alt="Image description" width="628" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When it comes to instance type, We can keep it within the free tier.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JT88RYKx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/020kwouyhuinb88whim8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JT88RYKx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/020kwouyhuinb88whim8.png" alt="Image description" width="628" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Uc8-HEWH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oe7te61jcupe1g0zynhx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Uc8-HEWH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oe7te61jcupe1g0zynhx.png" alt="Image description" width="628" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose a subnet and note for later&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZYyaDUF_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hw3s90u8238l7dgidpmj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZYyaDUF_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hw3s90u8238l7dgidpmj.png" alt="Image description" width="628" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--E_prDiim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lmbigsb804cvna3lp7tn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E_prDiim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lmbigsb804cvna3lp7tn.png" alt="Image description" width="628" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YnvNnJxq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zbkfzeosz6lvu5kgj0pv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YnvNnJxq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zbkfzeosz6lvu5kgj0pv.png" alt="Image description" width="628" height="301"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now the Security Group page is where the OpenVPN AMI settings really shine. We’re presented with a security group that opens up everything we’ll need.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9NNoS8Qj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3hlnq56ehfhcg37n5rjo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9NNoS8Qj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3hlnq56ehfhcg37n5rjo.png" alt="Image description" width="628" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note: If practical, it would normally be a good idea to tighten those rules so only requests from valid company IP address ranges are accepted, but this will be fine for short-term testing.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5TcI7lfn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lxkvpd6u72bzimjdtkpu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5TcI7lfn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lxkvpd6u72bzimjdtkpu.png" alt="Image description" width="628" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, press Enter to all the default requirements.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dp04OMcu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oz0uas5k0pm1zx5a52lk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dp04OMcu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oz0uas5k0pm1zx5a52lk.png" alt="Image description" width="628" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note the Admin UI and Client UI.&lt;/p&gt;

&lt;p&gt;Accessing the server&lt;br&gt;
Paste the public IP address into the terminal as part of SSH command that calls the key pair set for this instance.&lt;br&gt;
ssh -i KeyPairName.pem openvpnas@&lt;/p&gt;

&lt;p&gt;We will need to give the openvpn user a password so We can use it to log into the web GUI.&lt;br&gt;
 We do that as sudo with the passwd command.&lt;br&gt;
sudo passwd openvpn&lt;/p&gt;

&lt;p&gt;Now We are going to use a browser to log into the web GUI. We use our server’s public IP address with the secure https prefix, followed by slash and admin.&lt;br&gt;
https:///admin&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gZqYPuoP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/drwm5iwzvu49c08o1xq9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gZqYPuoP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/drwm5iwzvu49c08o1xq9.png" alt="Image description" width="628" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Provide the username and password as set earlier.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UHFfc-7L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uiqlc4g2o985g8sth4dj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UHFfc-7L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uiqlc4g2o985g8sth4dj.png" alt="Image description" width="628" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HmRQN5eY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ing7bu158efofjq3sc2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HmRQN5eY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ing7bu158efofjq3sc2.png" alt="Image description" width="628" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oFlaTYxI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ju0qqobxbyghnij9eun.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oFlaTYxI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ju0qqobxbyghnij9eun.png" alt="Image description" width="628" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Provide the username and password and connect .&lt;/p&gt;

&lt;p&gt;And then ssh to Linux instance and it will responded successfully.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pzjNtsJ5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qg0evsa49xj5o3m3iw2l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pzjNtsJ5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qg0evsa49xj5o3m3iw2l.png" alt="Image description" width="628" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
