<?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: Pradheepa P</title>
    <description>The latest articles on DEV Community by Pradheepa P (@pradheepa).</description>
    <link>https://dev.to/pradheepa</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%2F630191%2F77bf664a-a0be-4542-b58d-b06ca3e8e783.jpg</url>
      <title>DEV Community: Pradheepa P</title>
      <link>https://dev.to/pradheepa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pradheepa"/>
    <language>en</language>
    <item>
      <title>Security 101 - Phishing</title>
      <dc:creator>Pradheepa P</dc:creator>
      <pubDate>Thu, 07 Dec 2023 11:10:31 +0000</pubDate>
      <link>https://dev.to/pradheepa/phishing-101-3amn</link>
      <guid>https://dev.to/pradheepa/phishing-101-3amn</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Phishing is a deceptive technique employed by cyber-criminals to trick individuals into revealing sensitive information, such as login credentials, financial details, or personal data. The &lt;a href="https://apwg.org/"&gt;Anti-Phishing Working Group (APWG)&lt;/a&gt; report publishes statistics about phishing every quarter, and it's more concerning to find that the attack has been increasing every year and this type of attack targets both individuals and companies. According to the latest &lt;a href="https://docs.apwg.org/reports/apwg_trends_report_q1_2023.pdf"&gt;report&lt;/a&gt; from APWG , financial institutions take the major brunt of this attack. &lt;/p&gt;

&lt;p&gt;In this blog, we will explore the various phishing tactics and essential strategies to protect yourself from these malicious attacks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of Phishing
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zxJUtH7M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hu4lkk3pe11qo75ojuyk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zxJUtH7M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hu4lkk3pe11qo75ojuyk.png" alt="Types of Phishing" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The methods of deception vary, ranging from a plain redirect link to malicious websites to more advanced strategies targeting specific individuals or organizations. Following are the broadly-classified categories of Phishing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Email Phishing:
&lt;/h3&gt;

&lt;p&gt;Attackers send deceptive emails posing as legitimate entities to trick recipients into providing sensitive information.&lt;/p&gt;

&lt;h3&gt;
  
  
  Smishing (SMS Phishing):
&lt;/h3&gt;

&lt;p&gt;Phishing attacks conducted through text messages, tricking individuals into clicking on malicious links or providing sensitive information.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vishing (Voice Phishing):
&lt;/h3&gt;

&lt;p&gt;Phishing attacks over phone calls, where attackers use social engineering to manipulate individuals into divulging sensitive information.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pharming (Page Hijacking):
&lt;/h3&gt;

&lt;p&gt;Redirects website traffic to fraudulent sites using malicious software, aiming to collect sensitive information.&lt;/p&gt;

&lt;h3&gt;
  
  
  Clone Phishing:
&lt;/h3&gt;

&lt;p&gt;Attackers create replicas of legitimate emails, with minor modifications, to deceive recipients into disclosing sensitive information.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Search Engine Phishing:
&lt;/h3&gt;

&lt;p&gt;Creation of fake websites optimized for search engines to lure users and extract sensitive information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recognizing Phishing Attempts
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SIz0lPlo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5nvxw8mv7n1odvz1ocuw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SIz0lPlo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5nvxw8mv7n1odvz1ocuw.png" alt="How to Identify Phishing" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Though these attacks are often widespread, the victims ignore some common red flags. Learning how to differentiate between legitimate communication and potential threats is essential to identify the phishing attempts. Following are some of the common red flags in the phishing message.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A Sense of urgency or threat&lt;/li&gt;
&lt;li&gt;The malicious link that prompts to enter the password&lt;/li&gt;
&lt;li&gt;Request for financial transaction on clicking of the link&lt;/li&gt;
&lt;li&gt;Prompting to provide full access to your laptop or your mobile phone&lt;/li&gt;
&lt;li&gt;Offer or Promotion in the message that is too good to be true.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Protecting Yourself Against Phishing
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QtNPZKmz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v4k0ddahkrzrtyye504f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QtNPZKmz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v4k0ddahkrzrtyye504f.png" alt="Phish-Proof" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Enable Multi-Factor Authentication.&lt;/li&gt;
&lt;li&gt;Change Passwords Regularly to reduce the window of the attack.&lt;/li&gt;
&lt;li&gt;Don't give out any financial data or personal information to unsafe or http websites.&lt;/li&gt;
&lt;li&gt;Stay informed of similar attacks in your region.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>beginners</category>
      <category>cybersecurity</category>
      <category>web</category>
      <category>security</category>
    </item>
    <item>
      <title>VPC Peering</title>
      <dc:creator>Pradheepa P</dc:creator>
      <pubDate>Sun, 20 Jun 2021 14:15:11 +0000</pubDate>
      <link>https://dev.to/aws-builders/vpc-peering-1pg4</link>
      <guid>https://dev.to/aws-builders/vpc-peering-1pg4</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Often times, one logical group of virtual network (VPC) would want to interact with the other. AWS has provided options to connect between VPCs of the same region and also different regions.&lt;/p&gt;

&lt;h3&gt;
  
  
  VPC Peering
&lt;/h3&gt;

&lt;p&gt;VPC Peering is a networking connection provided by AWS to connect two VPCs. The VPCs can be from the same or different accounts. Since VPC is a region based entity, VPC Peering can also be established between VPCs from different regions in the same account. Once the peering is established, the instances in either of the VPCs can connect with each other as if they are in the same account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GYgVuiFU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hofgdv0xrmta61ttbs1n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GYgVuiFU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hofgdv0xrmta61ttbs1n.png" alt="VPC Peering" width="488" height="253"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  VPC Peering - Same Region
&lt;/h3&gt;

&lt;p&gt;To create a Peering Connection, go to VPC dashboard and click on &lt;code&gt;Create Peering Connection&lt;/code&gt;. The wizard looks like as below. We need to provide the local VPC which we are interested to peer with and its CIDR block. If we are connecting to the same region in the same account, then we can select &lt;code&gt;My Account&lt;/code&gt; and &lt;code&gt;This region&lt;/code&gt; and provide the VPC and its CIDR to be connected to.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z7J4EVAD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u9qnrzpr624lj7eadby8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z7J4EVAD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u9qnrzpr624lj7eadby8.png" alt="Create VPC Peering" width="800" height="752"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating, the peering connection looks like below, and shows the peering connection status as &lt;code&gt;Active&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9Vkc0R47--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4c9k1jx1erajjd8zoka4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9Vkc0R47--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4c9k1jx1erajjd8zoka4.png" alt="VPC Peering Config" width="800" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next step after creating the VPC peering connection is to update the route table of the subnets in both the VPCs. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fUG_AVqw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qksygqwxvkmkahevxapv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fUG_AVqw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qksygqwxvkmkahevxapv.png" alt="VPC Peering Route Table" width="800" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;VPC peering is a one-to-one connection between VPCs. So, to connect to another VPC, another peering connection has to be created and the route tables to be updated. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S4SY82ju--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/02oek9va7fc4df93zrcj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S4SY82ju--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/02oek9va7fc4df93zrcj.png" alt="Multiple VPC Peering" width="800" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If VPC A has a connection with VPC B and VPC C, this does not mean that a peering connection is automatically available between VPC B and VPC C since B is connected to A. Another peering connection has to be created to establish this relationship.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ge_6hTT---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8g5ei0nmrqra84imcu0d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ge_6hTT---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8g5ei0nmrqra84imcu0d.png" alt="Multiple VPC Peering No Connection" width="800" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Things to know
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;VPC Peering allows to reference security groups from the peer VPC in the same region.&lt;/li&gt;
&lt;li&gt;Supports DNS hostname resolution to return private IP address.&lt;/li&gt;
&lt;li&gt;Supports peering of both IPv4 and IPv6 addresses.&lt;/li&gt;
&lt;li&gt;The VPCs cannot have overlapping IP addresses.&lt;/li&gt;
&lt;li&gt;No redundant Peering connection can be made between the same VPCs. Only one peering connection is supported.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Can you answer the following questions?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Can NACL be accessed among VPCs?&lt;/li&gt;
&lt;li&gt;How to health check the VPC Peering Connection?&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://d1.awsstatic.com/events/reinvent/2019/REPEAT_2_AWS_networking_fundamentals_NET201-R2.pdf"&gt;https://d1.awsstatic.com/events/reinvent/2019/REPEAT_2_AWS_networking_fundamentals_NET201-R2.pdf&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>aws</category>
      <category>vpc</category>
      <category>network</category>
      <category>peering</category>
    </item>
    <item>
      <title>Amazon VPC - An Overview</title>
      <dc:creator>Pradheepa P</dc:creator>
      <pubDate>Mon, 14 Jun 2021 09:45:50 +0000</pubDate>
      <link>https://dev.to/aws-builders/amazon-vpc-an-overview-2321</link>
      <guid>https://dev.to/aws-builders/amazon-vpc-an-overview-2321</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Amazon VPC (Amazon Virtual Private Cloud) is used to launch AWS resources into a virtual network. The various components inside the Amazon VPC defines the traffic, security, routing configurations etc. &lt;/p&gt;

&lt;h3&gt;
  
  
  Regions and Availability Zones
&lt;/h3&gt;

&lt;p&gt;AWS Global Infrastructure at the high level were distributed as Regions. Region is a physical location in the world like Ireland, London, Singapore etc. Each region is further composed of Availability Zones (AZ). Availability Zones (AZ) are nothing but discrete data centers. For example, if Singapore is the region, then within that region, then AWS might have 3 different data centers located in the East, West, South of Singapore, that are isolated from one another. So if there is a power outage or accidental fire in one data center, the other data center will continue to operate without causing any disruption.&lt;/p&gt;

&lt;h3&gt;
  
  
  Amazon Virtual Private Cloud
&lt;/h3&gt;

&lt;p&gt;Having defined the regions and availability zones, the following diagram helps to fit VPC in the global infrastructure. Amazon VPC is the virtual network is created in a specific region that spans across multiple Availability Zones. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm83rvz82s192fxz9ei26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm83rvz82s192fxz9ei26.png" alt="Networking Series"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So when an instance has to be created inside the VPC, it can be chosen to host them in any of the availability zones inside the region. The instance is the physical server that has an IP address and are physically placed inside a data center (Availability Zone). &lt;/p&gt;

&lt;p&gt;To visualize it, imagine placing your laptop (instance) in one of your office premises at location A(Availability Zone-a). If you are visiting another branch at location B(Availability Zone - b) of your office on the next day to resume your work. The instance you placed at location A cannot be physically accessible to you. But, if the data inside your laptop (instance) at location A can be copied to another laptop at location B, then you would be able to resume your work. You usually don't care about the physical location as long as we were able to perform the same function as you did with the laptop (instance) at A.&lt;/p&gt;

&lt;p&gt;The availability zones though might seem redundant, often most real world applications are hosted in more than one availability zones for the resiliency. So when we define our virtual network (VPC), it has the option to span across multiple availability zones within the same region.&lt;/p&gt;

&lt;h3&gt;
  
  
  CIDR Block
&lt;/h3&gt;

&lt;p&gt;To create a VPC, we need to define the &lt;a href="https://dev.to/aws-builders/networking-series-cidr-286h"&gt;CIDR Block IP&lt;/a&gt; range. This defines the number of instances that a VPC can have. Since this is at the VPC level, the IP addresses can span across multiple AZ. &lt;/p&gt;

&lt;p&gt;Let us consider the default VPC's &lt;code&gt;IP CIDR Block&lt;/code&gt; which is &lt;code&gt;172.31.0.0/16&lt;/code&gt;. The /16 means the first 16 bits (172.31 segment) had to remain unchanged and hence the first two IP segments cannot take any other value. This provides us with the room to change the last two IP segments to any number between (0-255). So the default VPC can take 65536 IP addresses. &lt;/p&gt;

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

&lt;h3&gt;
  
  
  Subnets
&lt;/h3&gt;

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

&lt;p&gt;We can further segment the IP address (Subnets) at the AZ level.  Let us consider the CIDR values for the two AZs &lt;code&gt;172.31.0.0/24&lt;/code&gt; and &lt;code&gt;172.31.1.0/24&lt;/code&gt;. This could mean that the range of IP addresses were grouped as &lt;code&gt;(172.31.0.0 - 172.31.0.255)&lt;/code&gt;, &lt;code&gt;(172.31.1.0 - 172.31.1.255)&lt;/code&gt; each with 256 IP addresses.  Now I am assigning these two IP ranges to two different Availability Zones. The first AZ will take the range as &lt;code&gt;(172.31.0.0 - 172.31.0.255)&lt;/code&gt; and the second as &lt;code&gt;(172.31.1.0 - 172.31.1.255)&lt;/code&gt;. Let us consider only one availability zone, because the other is going to be an exact replica. &lt;/p&gt;

&lt;p&gt;I can use the entire 256 range as one logical group or can further divide them into multiple groups. These logical groups are called subnets (sub-networks). Let us consider two subnets within an AZ, then the CIDR range of the subnets can be &lt;code&gt;172.31.0.0/24&lt;/code&gt; and &lt;code&gt;172.31.128.0/24&lt;/code&gt; as 128 IP addresses each. &lt;/p&gt;

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

&lt;h3&gt;
  
  
  Security Groups
&lt;/h3&gt;

&lt;p&gt;The picture shows that in an availability zone, we have created two subnets (private and public). As the name suggests, one subnet will allow internet access and the other will not. The traffic configuration has to be defined to make them public and private. &lt;/p&gt;

&lt;p&gt;It a very common real-world scenario for hosting a web application. The instances acting as web-servers are public and should be reachable via HTTP (Port 80) and HTTPS (Port 443) traffic, but the database instances or application servers will not be accessible to internet but only to web-servers. As shown in the diagram below, we can define two security groups namely &lt;code&gt;Web Server Security Group&lt;/code&gt; and &lt;code&gt;App Server Security Group&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fculakz4hfgbdnudffjtn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fculakz4hfgbdnudffjtn.png" alt="Security Group Inside VPC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A security group is used to control inbound and outbound traffic. The &lt;code&gt;Security Groups&lt;/code&gt; act at the instance level in a VPC. Following is the wizard for creating a security group. We need to define the allowed inbound traffic and outbound traffic and associate with the VPC which this security group needs to be part of. &lt;/p&gt;

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

&lt;h4&gt;
  
  
  Summary
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Act at the instance level.&lt;/li&gt;
&lt;li&gt;Security group rules enable us to filter traffic based on protocols and port numbers.&lt;/li&gt;
&lt;li&gt;The rules are stateful. For example if a port 443 is enabled for inbound, then 443 is enabled for outbound as well regardless of the outbound rules. &lt;/li&gt;
&lt;li&gt;There is no deny rule. Only allow.&lt;/li&gt;
&lt;li&gt;Instances associated with a security group can't talk to each other unless the rules allowing the traffic has been added.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  NACL (Network Access Control List)
&lt;/h3&gt;

&lt;p&gt;It is similar to the security group which defines network access inside the VPC but this operates at the subnet level. If we were to define common traffic rule across the subnet, we define in NACL. Following is the configuration for the default NACL created inside the default VPC. Here we can see the subnet associations in the third tab. &lt;/p&gt;

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

&lt;p&gt;This wizard says that these are all the allowed inbound and outbound rules and these are the subnets associated with this NACL rules. This is unlike the security group where we just define the inbound and outbound rules. We don't have to define the instances associated with the security group while creating it. The security groups are associated with the instances only in the instance creation wizard. But with NACL, it had to define the subnets associated with it. &lt;/p&gt;

&lt;h4&gt;
  
  
  Summary
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Operate at the subnet level.&lt;/li&gt;
&lt;li&gt;Inbound and Outbound rules had to explicitly defined. For example, a port 80 allow inbound rule in NACL does not mean port 80 outbound rule like security group. If it's not configured it will be automatically denied.&lt;/li&gt;
&lt;li&gt;We can define the rules to both allow and deny.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Route Tables
&lt;/h3&gt;

&lt;p&gt;Route tables is like a traffic controller to the subnet in the VPC and contains rules for which packets to go where. It is more like a directory of what are all the possible routes that can happen within the subnet. Often times, I confuse route table with NACL because both are associated with the subnet.&lt;/p&gt;

&lt;p&gt;A sample route table looks like below for a public subnet. If the VPC was set up to have the address space of &lt;code&gt;172.16.0.0/16&lt;/code&gt;, the &lt;code&gt;local&lt;/code&gt; route defined as &lt;code&gt;172.16.0.0/16&lt;/code&gt; allows all of the resources created within the VPC to talk to each other without any additional configuration. The next configuration is the IPv6 config inside the VPC to talk to each other. Creating a config &lt;code&gt;0.0.0.0/0&lt;/code&gt; and attaching the target to the Internet Gateway (This has to be created ahead of configuring it in the route table) makes any subnet that is attached to this route table public because it has access to internet. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvpdgihplvnjca7i7cmm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvpdgihplvnjca7i7cmm.png" alt="Public Route Table"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To get to the internet, go via Internet Gateway&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F408cdm3oegtgmw3hzvxx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F408cdm3oegtgmw3hzvxx.png" alt="Private Route Table"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To get to anything inside the VPC - stay local. No route anywhere else&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Summary
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Each subnet can have only one route table. &lt;/li&gt;
&lt;li&gt;Route table can be shared across subnets.&lt;/li&gt;
&lt;li&gt;All the routes for the subnet based on this route table. &lt;/li&gt;
&lt;li&gt;NACL and Security Groups are meant for securing the instances found under &lt;code&gt;SECURITY&lt;/code&gt; section of the VPC create wizard and not meant primarily for routing. &lt;/li&gt;
&lt;li&gt;If we look at the diagram below, we can see the first point of contact for any traffic is the route table attached to the subnet and then NACL and security group.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr6s6i8e3yd2ec95d2dca.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr6s6i8e3yd2ec95d2dca.png" alt="Route Table"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Internet Gateway
&lt;/h3&gt;

&lt;p&gt;As the name suggests, this is the gateway to the public internet access. If we are hosting a web application, the web servers are usually public facing and be reachable via internet. In order to achieve this, we should first create an Internet Gateway and define the route in the route table. This allows internet traffic both to and from the instance.&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Network Address Translation (NAT) Gateway
&lt;/h3&gt;

&lt;p&gt;A NAT gateway is a Network Address Translation (NAT) service. The NAT gateway can be used so that the instances in a private subnet can connect to services outside the VPC but external services cannot initiate a connection with those instances. For example to patch security updates. There are two types of NAT Gateway, Public and Private. Public as the name says will be connected to the internet (one-way) and Private Gateway is used to connect other VPCs. A public NAT gateway is created in a public subnet and will be associated with an elastic IP address.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can you answer the following questions?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Can a subnet exists without the route table?&lt;/li&gt;
&lt;li&gt;What is the difference between NACL and route table?&lt;/li&gt;
&lt;li&gt;What is a CIDR Block IP range? &lt;/li&gt;
&lt;li&gt;If the route table is associated with the subnet, why it's shown in the VPC console as part of VPC configuration?&lt;/li&gt;
&lt;li&gt;How many route tables can a VPC have?&lt;/li&gt;
&lt;li&gt;What is a main route table in VPC and can you edit the main route table?&lt;/li&gt;
&lt;li&gt;Is it possible to create another route table and make that as a main route table?&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>aws</category>
      <category>vpc</category>
      <category>networking</category>
      <category>contentdelivery</category>
    </item>
    <item>
      <title>Networking Series - CIDR Block</title>
      <dc:creator>Pradheepa P</dc:creator>
      <pubDate>Sat, 05 Jun 2021 13:46:47 +0000</pubDate>
      <link>https://dev.to/aws-builders/networking-series-cidr-286h</link>
      <guid>https://dev.to/aws-builders/networking-series-cidr-286h</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Before working in serverless technologies, most of the applications I worked on were hosted on-prem. I used to interact with the infrastructure team and the questions they ask were sometimes not understandable to the application developers. The talk about firewall, ip addresses, ssl, ftp, connect direct connections are too much to comprehend initially. With serverless applications development though the application developer need not have to know about these terminologies, it's good to understand what's behind the scenes. &lt;/p&gt;

&lt;p&gt;AWS opens the doors for the application developers to know about the networking configuration used by their application. Usually in an on-prem applications the networking services are managed by a different team and the developers are not aware of the configuration. The interaction typically happens where the network team share the snippets of the logs whenever an error occurred connecting to our application. But with more applications being developed on cloud services, developers can at least access the lower environment configurations (dev or staging) which is usually mimicked to production. Let us start the series by getting to know what is a CIDR Block.&lt;/p&gt;

&lt;h3&gt;
  
  
  CIDR Block (Classless Inter-Domain Routing)
&lt;/h3&gt;

&lt;p&gt;While creating VPC in AWS, the second step is to provide the IP CIDR block i.e the range of IP addresses to be allocated to this VPC. It is of the format 10.0.0.0/16 (IP address followed by / and a number). Most of us knew the IP address format but what does this number signify in CIDR Block. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbnkw9e8t3gjt3obvglvf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbnkw9e8t3gjt3obvglvf.png" alt="CIDR Block Range"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;CIDR is an industry standard.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The number is the number of bits in an IP address that must match to be considered as part of the selected CIDR block.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each IP Segment i.e the number between the dots is of eight bits that makes the entire segment consisting of 32 bits.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Let us take the ip address &lt;code&gt;10.0.0.0&lt;/code&gt; and represent them in binary as &lt;code&gt;0000 1010. 0000 0000. 0000 0000. 0000 0000&lt;/code&gt;. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Let us take the CIDR block notation as &lt;code&gt;10.0.0.0/16&lt;/code&gt;. The number here mentions that any ip address that has the first 16 digits matched is part of this CIDR IP block. Since the first 16 bits has to remain unchanged, it leaves room for the rest of the 16 digits to take any value. Hence 2&lt;sup&gt;16&lt;/sup&gt; &lt;code&gt;65536&lt;/code&gt; ip addresses are available in this range.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Additional Resources
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.colocationamerica.com/ip-calculator" rel="noopener noreferrer"&gt;https://www.colocationamerica.com/ip-calculator&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>vpc</category>
      <category>cidr</category>
      <category>networking</category>
    </item>
  </channel>
</rss>
