Debrief: Configuring Access to the Application Instance via the Bastion Host

In the latest challenge lab I did, I configured access for an Application Instance (running in a private subnet) via a Bastion Host (in a public subnet). From setting up bastion hosts for secure access to configuring VPCs, subnets, route tables, NAT ga…


This content originally appeared on DEV Community and was authored by Ahmed Oluwasegun

In the latest challenge lab I did, I configured access for an Application Instance (running in a private subnet) via a Bastion Host (in a public subnet). From setting up bastion hosts for secure access to configuring VPCs, subnets, route tables, NAT gateways, and security groups, every step brought me closer to mastering cloud infrastructure.

Here’s a summary of what and how I set it up:

  1. Configurations for Accessing the Application Instance via the Bastion Host Bastion Host Setup Launched a Bastion Host in the Public Subnet (with a public IP). Attached a Security Group (SG) allowing inbound SSH (Port 22) from your IP. Connected to the Bastion Host using SSH and a private key (.ppk for PuTTY).

Application Instance (Private Subnet) Configuration
Launched an Application EC2 Instance in a Private Subnet (no public IP).
Created a Security Group allowing inbound SSH (Port 22) only from the Bastion Host's SG.
Used SSH from the Bastion Host to access the Private Instance.

Network ACL Configuration
Allowed inbound and outbound SSH traffic (Port 22) from the Bastion Host.
Configured ephemeral port rules (1024-65535) for return traffic.

2. Traffic Flow from the Internet to the Application Server
I defined traffic flow using multiple configurations:
**Security Group Rules
**For Bastion Host: Allowed inbound SSH (Port 22) from my IP.
For Application Server: Allowed SSH (Port 22) inbound only from the Bastion Host SG.

Route Tables
Public Subnet Route Table: Had a default route (0.0.0.0/0) pointing to the Internet Gateway (IGW).
Private Subnet Route Table: No direct internet access (default route pointed to a NAT Gateway).

Network ACLs (NACLs)
Configured Inbound & Outbound ACLs to allow SSH and return traffic.
Modified rules to block or allow ICMP traffic when required.

Summary of Traffic Flow

  1. From My Computer → Bastion Host (Public Subnet)
    Used SSH (Port 22) with a key pair.
    Security Group & NACL allowed traffic.

  2. From Bastion Host → Application Instance (Private Subnet)
    Used SSH (Port 22) to private IP.
    Security Group allowed only Bastion Host’s SG.

  3. From Application Instance → Internet (for updates)
    Used NAT Gateway for outbound access (no public IP).

A heartfelt thank you to the ALX team and AWS Cloud Computing program coordinators, especially for their guidance and unwavering support.
As I continue sharpening my skills in AWS Solutions Architecture, I am eager to contribute my expertise to innovative projects. If you’re looking for a passionate cloud computing enthusiast ready to solve complex infrastructure challenges, let’s connect!


This content originally appeared on DEV Community and was authored by Ahmed Oluwasegun


Print Share Comment Cite Upload Translate Updates
APA

Ahmed Oluwasegun | Sciencx (2025-03-10T12:58:52+00:00) Debrief: Configuring Access to the Application Instance via the Bastion Host. Retrieved from https://www.scien.cx/2025/03/10/debrief-configuring-access-to-the-application-instance-via-the-bastion-host/

MLA
" » Debrief: Configuring Access to the Application Instance via the Bastion Host." Ahmed Oluwasegun | Sciencx - Monday March 10, 2025, https://www.scien.cx/2025/03/10/debrief-configuring-access-to-the-application-instance-via-the-bastion-host/
HARVARD
Ahmed Oluwasegun | Sciencx Monday March 10, 2025 » Debrief: Configuring Access to the Application Instance via the Bastion Host., viewed ,<https://www.scien.cx/2025/03/10/debrief-configuring-access-to-the-application-instance-via-the-bastion-host/>
VANCOUVER
Ahmed Oluwasegun | Sciencx - » Debrief: Configuring Access to the Application Instance via the Bastion Host. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/03/10/debrief-configuring-access-to-the-application-instance-via-the-bastion-host/
CHICAGO
" » Debrief: Configuring Access to the Application Instance via the Bastion Host." Ahmed Oluwasegun | Sciencx - Accessed . https://www.scien.cx/2025/03/10/debrief-configuring-access-to-the-application-instance-via-the-bastion-host/
IEEE
" » Debrief: Configuring Access to the Application Instance via the Bastion Host." Ahmed Oluwasegun | Sciencx [Online]. Available: https://www.scien.cx/2025/03/10/debrief-configuring-access-to-the-application-instance-via-the-bastion-host/. [Accessed: ]
rf:citation
» Debrief: Configuring Access to the Application Instance via the Bastion Host | Ahmed Oluwasegun | Sciencx | https://www.scien.cx/2025/03/10/debrief-configuring-access-to-the-application-instance-via-the-bastion-host/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.