<?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: Vikas-Yadav-79</title>
    <description>The latest articles on DEV Community by Vikas-Yadav-79 (@vikasyadav79).</description>
    <link>https://dev.to/vikasyadav79</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%2F1524159%2Fe3f57650-16fa-4774-be33-1e05a2a755b0.png</url>
      <title>DEV Community: Vikas-Yadav-79</title>
      <link>https://dev.to/vikasyadav79</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vikasyadav79"/>
    <language>en</language>
    <item>
      <title>Running Three Tier Application using Docker</title>
      <dc:creator>Vikas-Yadav-79</dc:creator>
      <pubDate>Thu, 30 May 2024 11:41:44 +0000</pubDate>
      <link>https://dev.to/vikasyadav79/running-three-tier-application-using-docker-2nn7</link>
      <guid>https://dev.to/vikasyadav79/running-three-tier-application-using-docker-2nn7</guid>
      <description>&lt;h2&gt;
  
  
  Docker-Blog
&lt;/h2&gt;

&lt;p&gt;Running Three Tier Application using Docker&lt;/p&gt;

&lt;p&gt;To run Three Tier Application using Docker, we need to first create a Full Stack Project. We can use any of our Full Stack Project but if we don't have one then we can use someone else project also. Here, I have used a very easy simple project on GitLab. The link to this project is &lt;a href="https://gitlab.com/nanuchi/developing-with-docker"&gt;https://gitlab.com/nanuchi/developing-with-docker&lt;/a&gt;. This project is made using HTML, CSS, JavaScript, Express and MongoDB. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Architecture Of Our Project&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdoyctcum97wm5rub95wo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdoyctcum97wm5rub95wo.jpg" alt="Architecture" width="800" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;First you need to clone the Project Repository from the link using command&lt;br&gt;
&lt;br&gt;
&lt;code&gt;git clone https://gitlab.com/nanuchi/developing-with-docker&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5f6grLrF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/dfe551af-67ed-41c0-b3cf-b2953ed0a03d" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5f6grLrF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/dfe551af-67ed-41c0-b3cf-b2953ed0a03d" alt="Screenshot 2024-04-23 201706" width="800" height="152"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Files Present in Current Cloned Project &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1gn8e8sT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/aa058224-14e3-47de-8cd0-16752af28b53" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1gn8e8sT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/aa058224-14e3-47de-8cd0-16752af28b53" alt="Screenshot 2024-04-23 201728" width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To run a Three Tier Application, we need to run three Docker Containers simultaneously. So, it is necessary to run all these containers inside a network to avoid their interaction with other containers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;So, Network can be created by using the following command after starting the Docker Engine with name &lt;strong&gt;mongo-network&lt;/strong&gt; &lt;br&gt;&lt;br&gt;
&lt;br&gt;
&lt;code&gt;docker netowrk create mongo-network&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jlyvGO8_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/821944a6-8ac3-4b9f-a70d-66a83804850a" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jlyvGO8_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/821944a6-8ac3-4b9f-a70d-66a83804850a" alt="Screenshot 2024-04-23 202525" width="800" height="70"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can see all the networks using the command:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;docker network ls&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
. Now, we need to pull the image of MongoDB from DockerHub and make container from it. Then we need to run this container in the network to access MongoDB Database using Docker Container.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mr2M3Mk4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/f8d1dc4c-aaf6-4a04-ab04-5ae9654edfff" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mr2M3Mk4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/f8d1dc4c-aaf6-4a04-ab04-5ae9654edfff" alt="Screenshot 2024-04-23 202548" width="596" height="159"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To pull MongoDB image from DockerHub and run it as container we need to execute the command 

&lt;code&gt;docker run -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=password --network=mongo-network --name=vikasmongodb -d mongo&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4C5GBlow--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/6069e500-25db-4ca0-9351-e2904d27b853" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4C5GBlow--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/6069e500-25db-4ca0-9351-e2904d27b853" alt="Screenshot 2024-04-23 203416" width="800" height="179"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, the &lt;strong&gt;mongo&lt;/strong&gt; image will be automatically pull from the DockerHub to run the Container in &lt;strong&gt;detachable mode&lt;/strong&gt; with name &lt;strong&gt;&lt;em&gt;vikasmongodb&lt;/em&gt;&lt;/strong&gt; in the network &lt;strong&gt;mongo-network&lt;/strong&gt;. The Container will be running on the default &lt;em&gt;27017 port&lt;/em&gt;. You can check all the running containers using command&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;docker ps&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
. Environment Variables &lt;em&gt;Username&lt;/em&gt; and &lt;em&gt;Password&lt;/em&gt; are also passed to run the container. Similarly, we will be creating another container of &lt;em&gt;Express&lt;/em&gt; by pulling its image from the DockerHub.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Express Container can be run by using the follow command 

&lt;code&gt;docker run -p 8081:8081 -e ME_CONFIG_MONGODB_ADMINUSERNAME=admin -e ME_CONFIG_MONGODB_ADMINPASSWORD=password -e ME_CONFIG_MONGODB_SERVER=vikasmongodb --network=mongo-network --name=vikasmongo-express -d mongo-express&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ana5zdNs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/7cbd7d5d-5ef9-4f48-a248-7fded6ffb22e" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ana5zdNs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/7cbd7d5d-5ef9-4f48-a248-7fded6ffb22e" alt="Screenshot 2024-04-23 212746" width="800" height="154"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, the container with name &lt;strong&gt;&lt;em&gt;vikasmongo-express&lt;/em&gt;&lt;/strong&gt; is made to connect the MongoDB Database with the Frontend of the project in Docker. As explained above, the container will run on &lt;em&gt;8081 port&lt;/em&gt;. The environment variables Username and Password are passed of the MongoDB to access the Database along with the container name of the MongoDB in the Server Environment variable. The container will be running on the same network as the above container.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now, open the link in your browser

&lt;code&gt;localhost:8081&lt;/code&gt;

and create two databases &lt;strong&gt;my-db&lt;/strong&gt; and &lt;strong&gt;user-accounts&lt;/strong&gt;.
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0id1vOyX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/b8a1ebaa-da65-423f-9f6d-6f238965084d" alt="new_image" width="800" height="340"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Creating these two databases is necessary as the Frontend will be requiring these while running. Also, we need to change the MongoDB URL mentioned in the server.js file as we will be running MongoDB using Docker instead of Local Machine.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Naviagate to the

&lt;code&gt;server.js&lt;/code&gt;

file in the project and replace

&lt;code&gt;mongoUrlLocal&lt;/code&gt;

and

&lt;code&gt;mongoUrlDocker&lt;/code&gt;

with the following value

&lt;code&gt;mongodb://admin:password@vikasmongodb:27017&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iOX-szcR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/a9bc479c-ab75-4b8c-9b68-ad405a3a793a" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iOX-szcR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/a9bc479c-ab75-4b8c-9b68-ad405a3a793a" alt="Screenshot 2024-04-23 233057" width="800" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now, we need to delete the Dockerfile already provided in the project and create a new Dockerfile inside the

&lt;code&gt;app&lt;/code&gt;

folder of the project with the following commands

&lt;code&gt;FROM node
WORKDIR /app
COPY . .
ENV MONGO_DB_USERNAME=admin
ENV MONGO_DB_PWD=password
RUN npm install
EXPOSE 3000
CMD ["node", "server.js"]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k781WfFJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/78af4410-f898-4422-9346-408b70af7154" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k781WfFJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/78af4410-f898-4422-9346-408b70af7154" alt="Screenshot 2024-04-23 233045" width="627" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we need to create a Docker Image by building the Docker file to run it as a container in the network. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the &lt;strong&gt;CMD&lt;/strong&gt; Terminal inside the

&lt;code&gt;app&lt;/code&gt;

folder of the project and run the command 

&lt;code&gt;docker build -t 21bcp379-assignment&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KAz439FS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/5a183894-dab1-4951-9edd-578ed8fbb853" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KAz439FS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/5a183894-dab1-4951-9edd-578ed8fbb853" alt="Screenshot 2024-04-24 000839" width="800" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The execution of the above command will generate a Docker Image with name &lt;strong&gt;21bcp379-assignment&lt;/strong&gt; and it will take some time for it. After the Image is created we need to Run it as a Docker Container.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To run the Image as a Docker Container run the command 

&lt;code&gt;docker run -d -p 3000:3000 --network=mongo-network --name=21bcp379-app 21bcp379-assignment&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After the above command is executed, it will run a Docker Container in &lt;em&gt;detachable mode&lt;/em&gt; with name &lt;strong&gt;21bcp379-assignment&lt;/strong&gt; in the same network. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now, open the following link on you browser

&lt;code&gt;localhost:3000&lt;/code&gt;

and you will see a webpage running.&lt;/li&gt;
&lt;/ul&gt;

&lt;ul&gt;
&lt;li&gt;To push the Docker Image of the project run the command 

&lt;code&gt;docker tag 21bcp379-app vikas79/blog-app-21bcp379&lt;/code&gt;

and then

&lt;code&gt;docker push vikas79/blog-app-21bcp379&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j7GO41zs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/7359981a-5ee5-4647-8161-f8d3ab5172bc" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j7GO41zs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/7359981a-5ee5-4647-8161-f8d3ab5172bc" alt="WhatsApp Image 2024-04-24 at 10 44 22" width="461" height="34"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HBj57FBH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/b8f81bb0-4ffd-4b47-a549-f3d32dd71ff9" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HBj57FBH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/b8f81bb0-4ffd-4b47-a549-f3d32dd71ff9" alt="WhatsApp Image 2024-04-24 at 11 42 34" width="435" height="38"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it now you can see your image on docker hub repoistory&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EnMsTqvT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Vikas-Yadav-79/vikas-docker-blog/assets/121033913/38860de4-f686-4056-852c-8af200ca5012" alt="WhatsApp Image 2024-04-24 at 11 47 31" width="748" height="559"&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
      <category>devops</category>
      <category>microservices</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Understanding Internet Protocol Security (IPSec)</title>
      <dc:creator>Vikas-Yadav-79</dc:creator>
      <pubDate>Fri, 24 May 2024 15:28:17 +0000</pubDate>
      <link>https://dev.to/vikasyadav79/understanding-internet-protocol-security-ipsec-2gdk</link>
      <guid>https://dev.to/vikasyadav79/understanding-internet-protocol-security-ipsec-2gdk</guid>
      <description>&lt;h2&gt;
  
  
  What is Internet Protocol Security (IPSec)?
&lt;/h2&gt;

&lt;p&gt;Internet Protocol Security (IPSec) is a robust suite of protocols developed by the Internet Engineering Task Force (IETF) to ensure secure communication between two points across an IP network. IPSec is designed to provide data authentication, integrity, and confidentiality. It encrypts, decrypts, and authenticates packets, and outlines the necessary protocols for secure key exchange and key management.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F75dyecsmcb6a9ou941dj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F75dyecsmcb6a9ou941dj.png" alt="About Internet Protocol Security" width="800" height="565"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Components and Architecture of IPSec
&lt;/h2&gt;

&lt;p&gt;IPSec operates with two main components:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Encapsulating Security Payload (ESP):&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Provides data integrity, encryption, authentication, and anti-replay protection.&lt;br&gt;
Ensures the confidentiality of data by encrypting the payload, which prevents unauthorized access.&lt;br&gt;
Verifies the authenticity of the data source and confirms that the data has not been tampered with during transit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Authentication Header (AH):&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ensures data integrity and authenticity but does not provide encryption.&lt;br&gt;
Offers protection against replay attacks, ensuring that data packets are not resent by an unauthorized entity.&lt;br&gt;
Provides authentication for the payload, confirming that the data is from a legitimate source.&lt;/p&gt;

&lt;h2&gt;
  
  
  Working of IPSec
&lt;/h2&gt;

&lt;p&gt;IPSec works through a series of steps to ensure secure data transmission:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Policy Check:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hosts determine if the incoming or outgoing packets need to be processed by IPSec based on predefined security policies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;IKE Phase 1:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This initial phase establishes a secure channel between the communicating parties.&lt;br&gt;
It involves two modes:&lt;br&gt;
Main Mode: Offers greater security but is slower.&lt;br&gt;
Aggressive Mode: Faster but less secure.&lt;br&gt;
During this phase, the hosts authenticate each other and set up a secure channel for further negotiations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;IKE Phase 2:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this phase, the hosts agree on the cryptographic algorithms and the keying material required for encrypting the data.&lt;br&gt;
The establishment of a secure IPSec tunnel takes place here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Data Exchange:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once the secure tunnel is established, data can be securely exchanged.&lt;br&gt;
The data is encrypted and authenticated to ensure confidentiality and integrity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Tunnel Termination:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After the secure communication is completed, the IPSec tunnel is terminated, ensuring that no additional data is transmitted without proper encryption and authentication.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;IPSec is a critical component of network security, providing robust mechanisms to protect data integrity, confidentiality, and authenticity. By understanding its components and how it operates, organizations can better safeguard their communications across IP networks.&lt;/p&gt;

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