<?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: bismaakram</title>
    <description>The latest articles on DEV Community by bismaakram (@bismaakram28).</description>
    <link>https://dev.to/bismaakram28</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%2F3624390%2F56557274-cc5f-4d08-a1c7-eede539a739d.jpg</url>
      <title>DEV Community: bismaakram</title>
      <link>https://dev.to/bismaakram28</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bismaakram28"/>
    <language>en</language>
    <item>
      <title>kubectl Made Simple: Using Imperative Commands in Kubernetes</title>
      <dc:creator>bismaakram</dc:creator>
      <pubDate>Sat, 13 Dec 2025 18:04:07 +0000</pubDate>
      <link>https://dev.to/bismaakram28/kubectl-made-simple-using-imperative-commands-in-kubernetes-1ooo</link>
      <guid>https://dev.to/bismaakram28/kubectl-made-simple-using-imperative-commands-in-kubernetes-1ooo</guid>
      <description>&lt;p&gt;Kubernetes can feel overwhelming at first, but kubectl makes interacting with your cluster simple and powerful. In this post, we’ll explore imperative commands in Kubernetes—hands-on instructions you run directly with kubectl to create, update, and manage resources. &lt;/p&gt;

&lt;h2&gt;
  
  
  Fundamentals of Kubernetes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Cluster – A set of machines (nodes) that run containerized applications managed by Kubernetes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Node – A worker machine (virtual or physical) where containers are executed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pod – The smallest deployable unit in Kubernetes. A Pod represents one or more containers that share networking and storage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Replica set – Maintains a stable set of replica pods running at any given time. It is often used to guarantee the availability of a specified number of identical pods.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Service – A stable networking abstraction that exposes Pods and enables communication within or outside the cluster.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deployment – A controller that manages Pods and ensures the desired number of replicas are running.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Get Worker Nodes status&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;You can refer to my previous tutorial on how to create a eksctl cluter and managed node group.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get nodes -o wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.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%2Ff1i6sxwnhfdxnsci97jv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ff1i6sxwnhfdxnsci97jv.png" alt=" " width="800" height="121"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a Pod&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl run my-first-pod --image stacksimplify/kubenginx:1.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.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%2Fs4h8x0bd7ttjqqlihkvc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fs4h8x0bd7ttjqqlihkvc.png" alt=" " width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to access the application externally from the internet, we need to expose the Pod with a NodePort Service.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl expose pod my-first-pod  --type=NodePort --port=80 --name=my-first-service
kubectl get svc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.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%2Fit5cvjwo7j5zvd4tuae8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fit5cvjwo7j5zvd4tuae8.png" alt=" " width="800" height="112"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Access the application using public IP&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fj1ks2sf4ovgvw0fflrs4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fj1ks2sf4ovgvw0fflrs4.png" alt=" " width="664" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect to Container in a Pod&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl exec -it my-first-pod -- /bin/bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.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%2Fodl119o9r08g6hafbe0r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fodl119o9r08g6hafbe0r.png" alt=" " width="800" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clean-Up&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get all
kubectl delete svc my-first-service
kubectl delete pod my-first-pod
kubectl get all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.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%2Fr9m800loo627owktrgi2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fr9m800loo627owktrgi2.png" alt=" " width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you!! 🙌&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>cli</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Amazon EKS Tutorial: Create an EKS Cluster and Managed Node Group (Complete Guide)</title>
      <dc:creator>bismaakram</dc:creator>
      <pubDate>Thu, 11 Dec 2025 15:01:23 +0000</pubDate>
      <link>https://dev.to/bismaakram28/amazon-eks-tutorial-create-an-eks-cluster-and-managed-node-group-complete-guide-1ocg</link>
      <guid>https://dev.to/bismaakram28/amazon-eks-tutorial-create-an-eks-cluster-and-managed-node-group-complete-guide-1ocg</guid>
      <description>&lt;h2&gt;
  
  
  🚀 Introduction to Amazon EKS
&lt;/h2&gt;

&lt;p&gt;In this blog, we’ll take a simple, high-level look at how an Amazon EKS cluster works and the key components behind it. An EKS cluster is built on four main pieces: the control plane, worker nodes (node groups), Fargate profiles, and the VPC.&lt;/p&gt;

&lt;p&gt;The control plane is fully managed by AWS—it runs the Kubernetes API server and controllers, and automatically handles availability and health. Your workloads run on worker nodes, which are EC2 instances grouped together as node groups, or on Fargate, where pods run serverlessly without managing any EC2 instances.&lt;/p&gt;

&lt;p&gt;Finally, the VPC is what connects everything. Your subnets, routing, and security groups decide how your nodes communicate with the control plane and how securely your applications run.&lt;/p&gt;

&lt;p&gt;In the next sections, we’ll break down each of these components step-by-step and see how they come together when you build an EKS cluster. &lt;/p&gt;

&lt;p&gt;Let’s dive in! 🌟🌟&lt;/p&gt;

&lt;p&gt;We will be running this on Windows machine, you can find similar steps for MacOS and Linux in AWS official documentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1 - Install AWS CLI.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Download Binary and install it. &lt;a href="https://awscli.amazonaws.com/AWSCLIV2.msi" rel="noopener noreferrer"&gt;https://awscli.amazonaws.com/AWSCLIV2.msi&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 2 - Install kubectl CLI.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Install kubectl on Windows 10
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir kubectlbinary
cd kubectlbinary
curl -o kubectl.exe https://amazon-eks.s3.us-west-2.amazonaws.com/1.16.8/2020-04-16/bin/windows/amd64/kubectl.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Update the system Path environment variable
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Users\bisma\Documents\kubectlbinary

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Verify the kubectl client version
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl version --short --client
kubectl version --client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3 - Install eksctl CLI
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Install AMD64_x86/64 zip file from &lt;a href="https://docs.aws.amazon.com/eks/latest/eksctl/installation.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/eks/latest/eksctl/installation.html&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Make sure to unzip the archive to a folder in the PATH variable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Amazon EKS is a paid service, and not included in free tier. There is a 0.10 USD per hour charge for the EKS cluster and 0.0416 USD per hour for EKS Worker nodes T3 Medium server in N.Virginia.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next, lets create an EKS cluster using the command.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eksctl create cluster --name=eksdemo1 \
                      --region=us-east-1 \
                      --zones=us-east-1a,us-east-1b \
                      --without-nodegroup 
eksctl get cluster
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To follow best practices, we should create and associate an &lt;strong&gt;IAM OIDC identity provider&lt;/strong&gt;, which allows your EKS cluster to securely use IAM roles for Kubernetes service accounts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eksctl utils associate-iam-oidc-provider \
    --region us-east-1 \
    --cluster eksdemo1 \
    --approve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a new EC2 Key Pair with name eks-demo. This key pair will help to the connect with EKS worker nodes from terminal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fyg8rbtjrzukp04r7w5mm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fyg8rbtjrzukp04r7w5mm.png" alt=" " width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create Node Group with additional add-ons in Public Subnet.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Create Public Node Group   
eksctl create nodegroup --cluster=eksdemo1 \
                       --region=us-east-1 \
                       --name=eksdemo1-ng-public1 \
                       --node-type=t3.medium \
                       --nodes=2 \
                       --nodes-min=2 \
                       --nodes-max=4 \
                       --node-volume-size=20 \
                       --ssh-access \
                       --ssh-public-key=kube-demo \
                       --managed \
                       --asg-access \
                       --external-dns-access \
                       --full-ecr-access \
                       --appmesh-access \
                       --alb-ingress-access 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Login to worker node using EC2 Key Pair.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# For MAC or Linux or Windows10
ssh -i kube-demo.pem ec2-user@&amp;lt;Public-IP-of-Worker-Node&amp;gt;

# For Windows 7
Use putty

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Update worker nodes security group to allow all traffic.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F7totd6wwg038fgmmn0bg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F7totd6wwg038fgmmn0bg.png" alt=" " width="800" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Delete the cluster at the end of this exercise to make sure you dont incur additional charges.&lt;/em&gt;&lt;br&gt;
&lt;strong&gt;Important:&lt;/strong&gt; Revert security group rules prior to deleting the cluster.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Delete Cluster
eksctl delete cluster eksdemo1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thank you! 🌸&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>tutorial</category>
      <category>aws</category>
    </item>
    <item>
      <title>Secure your VPC with AWS Network Firewall</title>
      <dc:creator>bismaakram</dc:creator>
      <pubDate>Thu, 04 Dec 2025 10:12:42 +0000</pubDate>
      <link>https://dev.to/bismaakram28/implement-an-aws-network-firewall-5hh9</link>
      <guid>https://dev.to/bismaakram28/implement-an-aws-network-firewall-5hh9</guid>
      <description>&lt;p&gt;👋 Hello tech enthusiasts!&lt;/p&gt;

&lt;p&gt;In this blog, we’ll walk through the implementation of AWS Network Firewall using a hands-on lab 🧪. Our objective is to understand how stateless and stateful rule groups work by building a simple yet practical setup 🛡️⚙️. &lt;/p&gt;

&lt;h2&gt;
  
  
  🎯 Lab Objectives
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;We will launch a simple web server on an EC2 instance.&lt;/li&gt;
&lt;li&gt;Create a Stateless rule to block the inbound ICPM (ping request) traffic to the web server.&lt;/li&gt;
&lt;li&gt;Create a Stateful rule to allow outbound traffic from the webserver to a particular domain name e.g aws.amazon.com over TLS and block all other outgoing traffic&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We’ll use the following architecture diagram as the reference for our setup.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F1yygakznp53zft013pj5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F1yygakznp53zft013pj5.PNG" alt=" " width="800" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🖥️ Launch your webserver on an EC2 instance
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;SSH to EC2 instance and install HTTPD web server (In security group allow SSH, HTTP and ICMP traffic from anywhere 0.0.0.0/0). We need to make sure that the security group is not restricting any traffic.&lt;/li&gt;
&lt;li&gt;Verify that you are able to access the web server over a browser using EC2 instances public IP or public DNS&lt;/li&gt;
&lt;li&gt;Verify that you are able to ping to EC2 instance from your workstation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;In VPC settings, enable DNS resolution and DNS hostnames, to ensure you can access your webserver using the public DNS.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fc8ahq4fq7hd8ywp505tz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fc8ahq4fq7hd8ywp505tz.png" alt=" " width="800" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can also successfully ping the EC2 instance from my workstation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fvdrl5gwfossnzotedsco.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fvdrl5gwfossnzotedsco.png" alt=" " width="708" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next steps, is to create a Network Firewall and associate with your VPC, and the Firewall subnet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fxi2nyy54ga16aqxm6jrg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fxi2nyy54ga16aqxm6jrg.png" alt=" " width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚡ Stateless Rules
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Drop all ICMP traffic from 0.0.0.0/0 to 0.0.0.0/0 (priority 10).&lt;/li&gt;
&lt;li&gt;Forward all other traffic to Stateful rule group (priority 20).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fs78mh2n2vyc1vfqlcd5n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fs78mh2n2vyc1vfqlcd5n.png" alt=" " width="800" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚡ Stateful Rules
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;pass tcp any any -&amp;gt; any 22 (msg:"Allow TCP 22"; sid:1000001; rev:1;)&lt;/li&gt;
&lt;li&gt;pass http any any -&amp;gt; any any (http.host; dotprefix; content:".amazonaws.com"; endswith; msg:"Permit HTTP access to the web server"; sid:1000002; rev:1;)&lt;/li&gt;
&lt;li&gt;pass tls any any -&amp;gt; any any (tls.sni; content:"aws.amazon.com"; startswith; nocase; endswith; msg:"Permit HTTPS access to aws.amazon.com"; sid:1000003; rev:1;)&lt;/li&gt;
&lt;li&gt;drop tcp any any -&amp;gt; any any (flow:established,to_server; msg:"Deny all other TCP traffic"; sid: 1000004; rev:1;)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Add Stateless and Stateful rule groups to the Firewall policy.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fd2c7uvmjcd5pr9jfr7a6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fd2c7uvmjcd5pr9jfr7a6.png" alt=" " width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next steps, lets modify the Route tables.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F6sq8yj1bmexoj3mdwluq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F6sq8yj1bmexoj3mdwluq.png" alt=" " width="800" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add a route to Firewall endpoint to the Public subnet.&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.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%2Fxps44z9yfbcqcyniwcol.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fxps44z9yfbcqcyniwcol.png" alt=" " width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add a route to Internet Gateway in the Firewall subnet.&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.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%2Fgfm3gp05xzw3na1k3yif.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fgfm3gp05xzw3na1k3yif.PNG" alt=" " width="800" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new route table for Internet Gateway.&lt;/li&gt;
&lt;li&gt;Add route for traffic going to 10.100.0.0/24, it should go through the Firewall endpoint.
&lt;img src="https://media2.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%2F0d8ppgfgu91tu9usb8vc.png" alt=" " width="800" height="302"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Go to edge associations and associate with the Internet Gateway.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F44lxvjz7iddhv633k5re.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F44lxvjz7iddhv633k5re.png" alt=" " width="800" height="309"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔍 Now, let's verify our Firewall rules.
&lt;/h2&gt;

&lt;p&gt;We can ping the IP address of our EC2 machine, to see if it is working.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Falz7ojo8n4eq79tihv1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Falz7ojo8n4eq79tihv1l.png" alt=" " width="710" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Perfect! It doesn't work 😅&lt;/p&gt;

&lt;p&gt;Now, let's try the public DNS &lt;a href="http://ec2-52-65-196-41.ap-southeast-2.compute.amazonaws.com/" rel="noopener noreferrer"&gt;http://ec2-52-65-196-41.ap-southeast-2.compute.amazonaws.com/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ftc76n50m8b86kd0mxchi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ftc76n50m8b86kd0mxchi.png" alt=" " width="800" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Excellent! 🎉 This is working, since we had a Stateful rule to allow the amazonaws.com domain name.&lt;/p&gt;

&lt;p&gt;That’s all for today! 🙌 Thank you for following along! 😊&lt;/p&gt;

</description>
      <category>networking</category>
      <category>aws</category>
      <category>tutorial</category>
      <category>security</category>
    </item>
  </channel>
</rss>
