AWS: How To Setup A Site-to-Site VPN (Start to Finish) 2024

TechNgo
21 Feb 202417:32

Summary

TLDRIn this speedrun tutorial, Techno demonstrates how to set up a site-to-site VPN on AWS without the need for on-premises equipment. The video covers creating VPCs, EC2 instances, and a StrongSwan instance to mimic an on-premises router. It guides through the process of configuring a VPN connection, adjusting route tables for traffic forwarding, and testing connectivity with ICMP pings between AWS and the simulated on-premises network, providing a practical approach to cloud-based network extension.

Takeaways

  • πŸš€ This is a speedrun tutorial for setting up a site-to-site VPN using AWS, with a focus on quick implementation rather than detailed explanations.
  • 🌐 The tutorial involves setting up two VPCs and EC2 instances, with one VPC representing the on-premises site and the other the AWS site.
  • πŸ” A StrongSwan EC2 instance is used as the router/firewall for the on-premises site, enabling the connection to AWS.
  • πŸ› οΈ The tutorial does not cover the creation of the EC2 instances and VPCs in detail but assumes they are already set up.
  • πŸ“‹ The process includes creating a customer gateway, virtual private gateway, and site-to-site VPN connection within AWS.
  • πŸ“ Static routes are configured to ensure traffic is directed correctly between the on-premises and AWS sites.
  • βš™οΈ The tutorial includes configuring StrongSwan on the EC2 instance to establish the VPN connection and handle traffic.
  • πŸ”„ Troubleshooting tips are provided for common errors, such as issues with starting the IPsec service.
  • πŸ–§ The final steps involve verifying the connection by pinging between the AWS and on-premises instances.
  • πŸ‘ The video concludes with a successful ping test, confirming the site-to-site VPN setup is working correctly.

Q & A

  • What is the purpose of this video tutorial?

    -The video tutorial aims to demonstrate how to create a site-to-site VPN using AWS in a speedrun format, covering all necessary steps quickly without extensive explanations.

  • Why does the creator use a VPC as an 'on-prem' device in this demo?

    -The creator uses a VPC as an 'on-prem' device because they do not have an actual on-premises device available for testing. This setup simulates a real-world scenario where an on-premises network connects to AWS through a VPN.

  • What role does the 'strongSwan' EC2 instance play in this setup?

    -The 'strongSwan' EC2 instance acts as a router or firewall in the on-premises network, establishing a connection with AWS and serving as the customer gateway for the VPN.

  • Why does the creator rename VPC 2 to 'on-prem'?

    -The creator renames VPC 2 to 'on-prem' to avoid confusion and clearly differentiate between the AWS VPC and the simulated on-premises network.

  • Why is Amazon Linux 2 used instead of Amazon Linux 3 for the 'strongSwan' instance?

    -Amazon Linux 2 is used because Amazon Linux 3 does not support strongSwan, which is required for this demonstration.

  • What is the purpose of creating a Customer Gateway in AWS?

    -The Customer Gateway in AWS identifies the public IP address of the on-premises network (simulated by the strongSwan EC2 instance) to establish the VPN connection between AWS and the on-premises network.

  • What does it mean when the VPN tunnel status is 'up'?

    -When the VPN tunnel status is 'up,' it indicates that the site-to-site VPN connection between the AWS VPC and the on-premises network has been successfully established and is actively routing traffic.

  • Why is it important to stop the source/destination check on the strongSwan EC2 instance?

    -Stopping the source/destination check ensures that the strongSwan EC2 instance can forward traffic between different networks, which is necessary for routing traffic through the VPN.

  • What is the significance of modifying the route tables in this setup?

    -Modifying the route tables ensures that traffic is correctly routed between the AWS VPC and the on-premises network through the VPN, enabling communication between the two networks.

  • What troubleshooting step does the creator take when the IPsec service fails to start?

    -The creator reviews the configuration files for potential typos, re-applies the system control commands, and checks the configurations step-by-step to resolve the issue, which ultimately allows the IPsec service to start successfully.

Outlines

00:00

πŸš€ Introduction to Setting Up a Site-to-Site VPN

This paragraph introduces the video's purpose, which is to demonstrate the quick setup of a site-to-site VPN connection using AWS EC2 instances. The presenter, Techno, mentions that a detailed explanation of the concepts and AWS configurations is available in a previous video, and this 'speedrun edition' will focus on the practical steps. The presenter outlines the process of setting up two Virtual Private Clouds (VPCs) and EC2 instances, one acting as a router or firewall to simulate an on-premises environment. The setup is entirely cloud-based due to the lack of physical on-premises equipment.

05:02

πŸ›  Configuring the Site-to-Site VPN Components

The second paragraph delves into the technical setup of the VPN connection. It begins with the creation of a customer gateway to define the IP address for the on-premises site, using the public IP of the 'strongSwan' EC2 instance as an example. The presenter then guides through the creation of a virtual private gateway and a site-to-site VPN connection. The process includes configuring the local and remote CIDR blocks, which represent the IP address ranges for the on-premises and AWS VPCs, respectively. Default settings for the tunnel options are used, and the creation of the VPN connection is finalized.

10:05

πŸ”„ Troubleshooting and Establishing the VPN Connection

In this paragraph, the presenter encounters an error while attempting to start the IPsec VPN, which leads to a troubleshooting session. The error message indicates a failure to start the Internet Key Exchange protocol. The presenter reviews each configuration step, ensuring there are no typos or misconfigurations. After correcting the issue, which may have been due to a missing 'systemctl' command, the VPN connection is successfully established, and the status is confirmed as 'active and running'. The presenter also discusses the importance of configuring the route tables to ensure proper traffic forwarding between the AWS VPC and the on-premises site.

15:07

πŸ“Ά Testing the VPN Connection with ICMP

The final paragraph focuses on testing the VPN connection by sending ICMP traffic between the AWS and on-premises EC2 instances. The presenter explains the need to update the route tables and security group rules to allow ICMP traffic. A ping test is performed from the AWS EC2 instance to the on-premises network, demonstrating successful connectivity. The presenter also ensures that return traffic is correctly routed back through the VPN by adjusting the route tables on the on-premises side. The video concludes with a recap of the steps taken and a reminder to the viewers to subscribe and comment if they found the content helpful.

Mindmap

Keywords

πŸ’‘Site-to-Site VPN

A Site-to-Site VPN is a type of Virtual Private Network that allows for secure communication between two or more remote networks over the internet. In the video's context, the host demonstrates how to create a Site-to-Site VPN to connect two Amazon Web Services (AWS) Virtual Private Clouds (VPCs) as if they were separate on-premises locations. The script mentions testing connectivity between two AWS EC2 instances across these connected VPCs.

πŸ’‘AWS EC2

AWS EC2, short for Amazon Elastic Compute Cloud, is a web service that provides resizable compute capacity in the cloud. It is fundamental to the video's tutorial, as the host uses EC2 instances to simulate on-premises devices and to demonstrate the setup of a Site-to-Site VPN. The script refers to EC2 instances on different VPCs and their role in the VPN configuration.

πŸ’‘VPC

A Virtual Private Cloud (VPC) is a virtual network dedicated to the user's AWS account, enabling the launch of AWS resources into a defined network space. The video script discusses creating two VPCs and configuring them to act as separate sites for the VPN connection, with one being renamed to 'on-Prem' for simplicity.

πŸ’‘OpenVPN

OpenVPN is an open-source software application that implements virtual private network (VPN) techniques to create secure point-to-point or site-to-site connections over the internet. The script mentions using OpenVPN, or 'strongSwan' as a stand-in for demonstration purposes, to configure the Site-to-Site VPN connection on an EC2 instance acting as an on-premises router or firewall.

πŸ’‘Customer Gateway

In the context of AWS, a Customer Gateway is a component for Site-to-Site VPN connections that represents the on-premises gateway device, such as a router or firewall. The script describes creating a Customer Gateway in AWS to specify the public IP address of the on-premises site, which is simulated by an EC2 instance in the video.

πŸ’‘Virtual Private Gateway

A Virtual Private Gateway is an AWS component that enables a VPN connection between an AWS VPC and a remote network. The video script explains creating a Virtual Private Gateway and attaching it to an AWS VPC to establish the connection for the Site-to-Site VPN.

πŸ’‘Route Table

A route table in AWS contains a set of rules, known as routes, that are used to determine where network traffic from subnets is directed. The script discusses modifying the route table to ensure that traffic is routed through the Virtual Private Gateway instead of using VPC peering, which is a different method of connecting VPCs.

πŸ’‘Security Group

A Security Group in AWS acts as a virtual firewall that controls inbound and outbound traffic for AWS resources. The script mentions configuring Security Groups to allow SSH and ICMP traffic, which is essential for establishing connections and testing the VPN setup.

πŸ’‘Network ACL

A Network Access Control List (Network ACL) in AWS provides network-level access control for resources associated with a VPC. The video script refers to ensuring that the Network ACL has 'quad zeros' (0.0.0.0/0) for inbound and outbound rules, which means it allows all traffic, for demonstration purposes.

πŸ’‘ICMP

ICMP, or Internet Control Message Protocol, is used for sending error messages and operational information indicating the status of efforts to deliver packets on an internet protocol (IP) network. In the script, ICMP is used for testing the connectivity between the AWS and simulated on-premises sites after the VPN is established.

Highlights

Introduction to the video: Setting up a site-to-site VPN in a speedrun edition, focusing on AWS cloud setup.

Quick note: For in-depth explanations, refer to the presenter's other video that covers the detailed reasoning behind each step.

Preparation: Two VPCs and EC2 instances are already created, simulating an on-premises setup using AWS.

Explanation: VPC 2 is treated as the on-premises network, with one EC2 instance acting as the router or firewall.

Setting up: Launching the necessary EC2 instances and creating a strongSwan EC2 instance to act as a VPN router, due to the absence of physical hardware.

Key Configuration: Use of Amazon Linux 2 to set up the strongSwan instance, as Amazon Linux 3 does not support strongSwan.

Important step: Ensure that the EC2 instance for strongSwan has a public IP address and is placed in a public subnet for SSH access.

Customer Gateway: Creation of a customer gateway in AWS, using the public IP of the strongSwan EC2 instance to simulate an on-premises device.

Virtual Private Gateway: Setting up a virtual private gateway in AWS and attaching it to the AWS VPC (VPC 1).

VPN Connection: Creation of the site-to-site VPN connection, specifying the static routes for the local and remote CIDR blocks.

Configuration: Editing the strongSwan configuration files on the EC2 instance to establish the VPN connection.

Troubleshooting: Resolving an issue with the IPsec service by rechecking and correcting configuration steps.

Verification: Confirming that the VPN tunnel is up and running by checking the AWS console.

Testing: Sending ICMP (ping) traffic between the AWS VPC and the on-premises VPC to validate the VPN connection.

Conclusion: Final verification of the ping tests and a recap of the entire process, ensuring that the site-to-site VPN is working as intended.

Transcripts

play00:00

hello everyone my name is techno and

play00:02

today we're going to create a sight to

play00:04

sight VPN and this is a speedrun Edition

play00:07

so if you're looking for an explanation

play00:08

I already do have a video about that

play00:10

where I go in depth of why I create

play00:13

certain things and how it's done on the

play00:14

AWS side but in this video today I'm

play00:17

going to show you exactly how to create

play00:18

a sight to sight VPN and I'll just go

play00:21

through everything really quickly so

play00:22

that way you'll be able to see me

play00:24

testing from 2 AWS ec2 instances but

play00:27

this is all done on the cloud and not on

play00:30

Prem because I don't have on- pram

play00:31

device so with that being said let's go

play00:33

ahead and begin right off the bat I

play00:35

already have two vpcs that I already

play00:36

created and I've already created two ec2

play00:39

instances over here on VPC 2 or on the

play00:44

19216801 16 Network this can be

play00:46

considered your on Prem device so

play00:49

because bpc2 is going to be acting as

play00:51

your on Prem device you want to make

play00:53

sure that one ec2 is considered as your

play00:56

router or your firewall that connects to

play00:59

ads yes because in the real world

play01:01

situation when you have a sight to side

play01:03

VPN you're going to have a router which

play01:06

has a public IP address that will be

play01:08

able to connect with AWS so I'll go

play01:10

ahead and show you exactly what I'm

play01:12

doing right now on what should already

play01:14

be configured so as you can see I

play01:15

already have vpc1 and VPC 2 so I'll just

play01:19

rename this for Simplicity so VPC 2-on

play01:22

Prem so that way we don't get confused

play01:25

between vpc1 and VPC 2 um likewise for

play01:28

vpc1 I'm just going to call this vpc1 D

play01:31

AWS so that way we know this is the AWS

play01:35

site and then bpc2 is your on-prem site

play01:38

of course if you do have an on-prem site

play01:40

you don't need to create VPC number two

play01:43

now the next step is to go to your ec2

play01:46

instance and create all the ec2

play01:49

instances that you'll want to establish

play01:51

connection or connectivity with each

play01:53

other now keep in mind that these two

play01:56

ec2 instances ec21 and ec2 have already

play02:00

been created so I'm not going to go

play02:01

through the steps on creating ec2s and

play02:04

whatnot if you haven't already just go

play02:05

ahead and check out my other video for

play02:07

an in-depth explanation as I said so I'm

play02:10

just going to go ahead and launch these

play02:13

instances or bring them up so I'm going

play02:15

to click on start instances and the only

play02:17

thing that I be creating now is your

play02:20

router or your firewall which is in this

play02:22

case a strong Swan ec2 instance we can

play02:25

go ahead and call this strong

play02:27

Swan scroll down and go to Amazon Amazon

play02:30

Linux 2 because Amazon Linux 3 does not

play02:32

support strong SW anymore remember that

play02:35

this is just for demo purposes I don't

play02:37

have a Cisco ASA nor do I have like a

play02:39

Pao Alto router for testing purposes so

play02:42

this is why we're going with strong Swan

play02:43

since it's free so we can go ahead and

play02:45

click on key pair I already have a key

play02:47

pair already if you don't go ahead and

play02:49

create one right over here was this

play02:51

create new pair network settings we're

play02:53

going to go on VPC number two which is

play02:55

your on Prem IP address or on Prem

play02:58

site subnet should be in a public subnet

play03:01

so we can SSH into it as far as Security

play03:04

Group I already have one in place that

play03:06

allows SSH as well as

play03:08

icmp and one more thing is whenever you

play03:11

create this ec2 instance make sure that

play03:14

it has a public IP

play03:17

address so over here where it says Auto

play03:20

assign public IP click on enable and

play03:23

you're good to go and launch this ec2 so

play03:25

going back to my diagram you should

play03:27

already have three ec2 instances created

play03:29

one on your AWS AWS VPC and two of them

play03:34

on your om Prem VPC we're going to go on

play03:36

the left hand side where this customer

play03:38

Gateway and create a customer Gateway

play03:41

this customer Gateway is so that ad ofs

play03:43

knows what the IP address is for your on

play03:45

Prem site so if we go back to this

play03:49

strong Swan ec2 instance that we created

play03:52

you'll notice that the public IP address

play03:54

is this

play03:55

100410 19 IP address so we go back to

play03:58

the customer Gateway tab

play04:00

type in strong Swan or any kind of

play04:02

nameing convention so that way you know

play04:04

that this is your on Prem router and

play04:06

then paste the IP address and we can

play04:09

ignore the certificate Arn and

play04:11

everything else and create this customer

play04:13

Gateway same thing on the left hand side

play04:14

go down to Virtual private Gateway click

play04:16

on that create a virtual private Gateway

play04:20

and call this

play04:22

vpg or anything you'd like to call it so

play04:24

on the top right corner of your screen

play04:26

you can click on attach to

play04:28

VPC and we want to attach it to your VPC

play04:32

D1 AWS because in a real world scenario

play04:35

your virtual private Gateway can only

play04:37

connect to one VPC in this case we want

play04:40

the AWS VPC to be connected which is VPC

play04:43

number one so once that's attaching the

play04:45

last thing that we can do is create

play04:47

sight to sight VPN so on the left hand

play04:49

side again right below virtual private

play04:51

Gateway click on sight to sight VPN

play04:52

connection go to the top right and

play04:54

create your VPN connection call this

play04:57

site to site

play05:01

dvpn or anything you'd like to call it

play05:03

click on your virtual private Gateway

play05:05

that was created customer Gateway same

play05:07

thing the one that we just created in

play05:10

this demonstration I'll show you how to

play05:11

create a static side to side VPN and sub

play05:13

Dynamic static prefix we we're going to

play05:15

just leave it as is for now the local

play05:18

and remote cider so the local cider

play05:20

would be from your on-prem device and if

play05:22

we look back at this diagram it should

play05:24

be the 192168 IP address range so on

play05:28

this local CER you can go and type in

play05:31

192.168.0.0 sl16 you could also leave

play05:35

Squad zeros but if we want to imagine as

play05:38

if this was a real world situation it's

play05:40

more ideal to have your on Prime IP

play05:42

address range in this diagram it's the

play05:45

10.0.0.0 sl16

play05:51

network okay tunnel one and tunnel 2

play05:54

options I'm just going to go ahead and

play05:56

leave it as default I'm not going to

play05:58

make any changes to it lastly just click

play06:00

on create VPN

play06:03

connection so we're almost there we

play06:05

created a sight toight VPN we already

play06:07

know that it's attaching to the VPC

play06:11

which is VPC number one or the AWS

play06:14

VPC and over here we can see that this

play06:17

strong swan ec2 has been

play06:20

created now keep in mind that when you

play06:23

click on the strong Swan ec2 you should

play06:26

go onto action networking change source

play06:29

in destination check and click on the

play06:31

check box for stop the reason why we

play06:34

want it to stop is so that if traffic is

play06:37

heading towards any ec2 instance that's

play06:39

not the strong Spa device packets will

play06:41

not automatically get dropped and it

play06:43

will just forward it to the next

play06:44

destination the next step is to connect

play06:46

to the strong SW ec2 instance click on

play06:50

connect and if you see this bird icon

play06:52

that means you successfully connected to

play06:54

your ec2 keep in mind that you need to

play06:56

allow SSH onto your security group and

play06:59

make sure that your network ACL is quad

play07:01

zeros for both inbound and outbound

play07:03

rules so now that we can confirm and

play07:05

connect to this ec2 instance or the

play07:08

strong Swan ec2 instance which is

play07:10

pretending to be your on Prem customer

play07:12

Gateway device the last thing that we

play07:14

need to do is configure this ec2 so that

play07:16

way it's configured to use strong spawn

play07:19

and we can go ahead and establish that

play07:20

side to side bpn connection so go back

play07:23

to your side to set VPN click on

play07:25

download configuration scroll down here

play07:29

this is future Brandon I just want to

play07:31

give a heads up that you should be using

play07:33

open Swan instead of strong Swan now

play07:35

that we've logged into our ec2 instance

play07:37

we're going to go ahead and start

play07:37

configuring according to this file so

play07:39

we're going to go ahead and click on

play07:41

pseudo or type in pseudo Su go to system

play07:46

CTL com so pseudo Nano paste and then

play07:51

hit enter copy all these three lines I

play07:53

know that down here already has it but

play07:56

go ahead and just delete it for safety

play07:58

measures and then paste everything

play07:59

everything as needed contrl x y and

play08:02

enter and then it says to apply changes

play08:04

by typing in system

play08:07

c-p and after step one I did forget to

play08:10

do one important step which was to

play08:12

install op one so we can go ahead and

play08:14

type in pseudo yum install open

play08:22

Swan hit y for

play08:28

yes

play08:30

okay now that we're done we can go ahead

play08:32

and start following step two or step

play08:34

three now so open up this IP sec.com

play08:37

contrl C pseudo

play08:42

Nano paste after opening up this file we

play08:45

can go ahead and copy this line over

play08:48

here paste it and then we're going to

play08:50

remove this hashtag or pound sign crl X

play08:56

Y enter now we have to create a new file

play08:59

file aws.com so contrl C pseudo Nano

play09:03

same thing again paste enter and then

play09:07

we're going to go ahead and type in the

play09:09

following values so after we open up

play09:11

this file one thing that you should

play09:13

modify on the notepad is to go over here

play09:15

where it says left subnet which is your

play09:17

local network local meaning your on Prem

play09:20

IP which is the

play09:22

192.168.0.0 sl6

play09:25

IP and right below that is your AWS IP

play09:28

address which in this case is 10.0.0

play09:32

sl16 so then go ahead and copy

play09:35

everything else control

play09:38

C paste it in

play09:40

here and then crl X Y enter lastly on

play09:45

step five we have to create a new file

play09:47

pseudo Nano paste and enter copy this

play09:51

line once you paste it click on CR X Y

play09:55

enter one thing that I did forget to

play09:57

mention is that over here where it thiss

play09:58

AU equals ESP go ahead and remove that

play10:01

and then save everything crl x y for yes

play10:04

and enter okay so now that this is

play10:06

established for tunnel one if you want

play10:08

to do the same on Tunnel 2 you're more

play10:09

than welcome to do so just do the same

play10:11

exact thing for tunnel one except do it

play10:13

for tunnel 2 lastly we need to go ahead

play10:15

and start our SAT toite VPN by typing in

play10:18

pseudo system CTL start IP SEC okay so

play10:23

this is our first error that we've

play10:24

encountered where it says fail to start

play10:26

internet key exchange protocol so I'm

play10:29

going to go ahead and recheck every

play10:30

single step that I made because I

play10:32

probably did make a typo of some sort I

play10:34

might have not noticed it we're going to

play10:35

go from step five all the way down to

play10:36

step uh step one and see what happened

play10:39

or what's the issue not sure if these uh

play10:41

these spaces make a difference but I'm

play10:42

just going to go ahead and contrl

play10:44

X enter and then lastly step two says

play10:48

system

play10:50

c-p now I'm going to go ahead and start

play10:52

the IP SEC

play10:54

again and that did the trick I don't

play10:57

know if it's because I forgot to put in

play10:58

the the system c-p but I just went

play11:01

through step five and went backwards to

play11:03

make sure I didn't make any typos and

play11:04

repasted everything so now if I go ahead

play11:07

and type in

play11:08

pseudo system CTL status IP SEC it

play11:14

should now say active and running if we

play11:16

go ahead and go to the S to set VPN and

play11:18

refresh the

play11:20

page it now says available available

play11:22

just means that the side to side VPN is

play11:24

created it's not modifying it's not

play11:26

getting deleted that's not the main

play11:28

focus the main focus is on Tunnel one so

play11:31

I'm going to go ahead and minimize this

play11:33

tab click on the side to side VPN tunnel

play11:35

details right now it shows us down but

play11:39

I'm pretty sure if we wait for a little

play11:41

bit it's going to go into the upstate so

play11:44

if you notice over here we go to ec2

play11:46

number one networking go to the subnet

play11:48

ID route table click on this route table

play11:51

open up this route table go to routes

play11:53

edit routes so rather than forwarding

play11:56

traffic to the VPC Pier because this was

play11:58

done in my previous video instead of

play12:00

Performing VPC peering this is now going

play12:03

to be done through a virtual private

play12:04

Gateway in this case click on Virtual

play12:07

private Gateway and over here this is

play12:09

the virtual private Gateway that we

play12:11

created at the beginning of this video

play12:13

and then click on Save changes so right

play12:15

now we just created a static route that

play12:18

forwards or forces traffic from your AWS

play12:22

VPC number one to forward traffic over

play12:24

to VPC number two or your arm Prem site

play12:27

let's go ahead and double check our set

play12:28

to set VPN and check on Tunnel one to

play12:30

see if it actually came

play12:33

up so over here if we refresh the page

play12:36

one more time click on side to side VPN

play12:39

tunnel details look at that it says

play12:42

tunnel one is up so now that we created

play12:44

the site to sight VPN the last thing

play12:46

that we're doing is sending traffic so

play12:49

for Simplicity Reasons I'm just sending

play12:50

icmp traffic so earlier we already know

play12:53

that ec2 instance number one should now

play12:55

know how to forward traffic over to the

play12:57

S to side VPN but on the return traffic

play13:00

we need to make sure that the ec2

play13:01

instances know how to forward traffic

play13:04

from a specific ec2 instance out to the

play13:07

sight to sight VPN because in a because

play13:09

on your arm Prem side of course you're

play13:11

going to send traffic to your firewall

play13:13

if we go ahead and go to ec2 instance

play13:15

number two go to networking click on the

play13:18

subnet ID and then go onto the route

play13:20

table edit this route table click on

play13:23

routes so right now we have a VPC Pier

play13:25

but I don't want that VPC Pier to be

play13:27

there because that would defeat the

play13:29

whole purpose of a set to set VPN so

play13:31

we're going to go ahead and eliminate

play13:32

this and put in instance so after you

play13:35

copy the open Swan ec2 instance you can

play13:39

go ahead and click over here and make

play13:43

sure that this says well right now it

play13:46

says strong Swan on the the name we are

play13:48

going to go ahead and go on to ec2

play13:49

instance number two Security Group look

play13:51

at the Ingress Rule and allow icmp

play13:54

because in my previous video I removed

play13:56

it but I forgot to add it back in so

play13:58

click on all icmp ipv4 from anywhere of

play14:02

course you don't want it from anywhere

play14:03

you want this specifically from your arm

play14:06

pram or AWS IP address

play14:08

range but for demo purposes of course

play14:11

I'm just going to go ahead and put it as

play14:13

quad zeros let's go ahead and recap and

play14:15

discuss what we've done so far so as of

play14:17

right now we have three ec2 instance

play14:19

that were created we have ec2 instance

play14:21

number one number two and this one

play14:23

called op Swan VPC we already know that

play14:27

a s to side VPN was created we

play14:28

configured open Swan to establish that

play14:32

sight toight VPN connection with the AWS

play14:35

VPC number one so all we're doing now is

play14:38

making sure that the route tables on VPC

play14:40

number one is forwarding to a virtual

play14:42

private Gateway and on VPC number two

play14:45

we're forwarding traffic to the ec2

play14:47

instance the open Swan ec2 instance so

play14:50

this means that anytime traffic should

play14:52

be going out to the set to set VPN

play14:55

traffic should be going to the open Swan

play14:57

ec2 and by by creating bpc2 we've been

play15:00

able to create or replicate a arm Prem

play15:03

so now the last step is to send icmp

play15:06

packets keep in mind that your Security

play15:08

Group should already be allowing for

play15:10

Ingress and egress for icmp so if you

play15:13

don't have it already go ahead and do

play15:15

that now so to make sure that we are now

play15:17

establishing this icmp test we're going

play15:19

to go on to ec2 instance number

play15:21

one this is your AWS ec2 by the way so

play15:25

pretend as if you want to connect from

play15:26

AWS to your on Prem we're going to go go

play15:28

ahead and copy the ec2 instance private

play15:31

IP address and this is in your on Prem

play15:33

site by the way so the 192168 network

play15:36

ping and now you'll notice that traffic

play15:38

is now forwarding quick pause this is a

play15:41

ping test from the ec2 instance number

play15:42

two to the op one ec2 instance okay so

play15:45

for the last step over here if you click

play15:47

on static route this is a side to side

play15:49

VPN where it's using static routing so

play15:51

you want to make sure that you click on

play15:53

static routes and you put in the on Prem

play15:57

or the VPC number two to IP address

play15:59

range and place it over here and then

play16:02

click on Save

play16:03

changes so once you go ahead and do that

play16:05

I'm just going to go ahead and start

play16:07

pinging the on Prem

play16:09

device so copy this IP address paste

play16:14

it and hit enter and it looks like we

play16:18

can ping ec2 number two or the on-prem

play16:21

site and same thing again we're just

play16:23

going to go ahead and ping from the on

play16:25

Prem site over to the ec2 instance

play16:27

number one

play16:31

so once we go ahead and paste

play16:33

that we can

play16:36

confirm we can go ahead and

play16:38

confirm that the icmp Ping is

play16:43

working and that is how you create your

play16:46

sight to sight VPN speedrun Edition I

play16:48

hope this information was helpful to you

play16:50

because I know that in my previous video

play16:52

I didn't really show my final test

play16:53

results basically at the very end just

play16:56

like what you saw at the static route I

play16:57

just forgot got to add in that static

play16:59

route and I didn't show it because I

play17:01

deleted my ec2 instances at the time I

play17:04

created that video but now that I've go

play17:06

gone ahead and done the same exact thing

play17:08

on this video you should now be able to

play17:10

create that side to side VPN as well as

play17:13

understand how to Ping from AWS to AWS

play17:16

even if you don't have an on Prem site

play17:18

to actually use I hope my video was

play17:20

helpful to you if you found it helpful

play17:22

like subscribe and comment on my video

play17:24

and I'll see you in my next one

play17:27

bye

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
AWSVPNEC2NetworkingCloud SetupSpeedrunAWS TutorialIT SecurityCloud NetworkingStrongSwan