Securing infrastructure using Bastion Host ⚔️

Securing infrastructure using Bastion Host ⚔️

Let's assume you have some virtual machines and you need to keep those private without exposing them to the public internet as a security concern. So you need to put those in a private network or avoid assigning public IPs to each VMs.

But then how do we access those VMs remotely if they don’t have a public IP? That's where Bastion Host comes in.

So what is Bastion Host??

Bastion host is a single-purpose server that let authorized users access a private network from an external network such as the internet.

How does it work?? 🤔

As I previously mentioned our VMs stayed private and don’t have public IPs. All of those only have private IPs. To access those VMs using private IPs, we can create a new virtual machine with public IP called Bastion Host and only expose necessary ports to the public internet.

So we can access our VMs through our Bastion Host as this image shows.

No alt text provided for this image

Advantages of Bastion Host 😁

  • Reduce attack surfaces.
  • Provides a single point for the logins in the network.
  • Easy to manage the security and keep the focus on a single exposed VM rather than exposing all VMs to the internet.
  • Easier to log all the attempts and take necessary measures for failing attempts.

Disadvantages of Bastion Host 🥲

  • It is generally used only for SSH access to virtual machines.
  • Bastion is an additional server to maintain.
  • If the Bastion host gets attacked then all other VMs are in danger.
  • If we lost access to the Bastion host then we lost access to all other VMs.

Best practices when securing Bastion Host 🔒

  • Only use for single purposes.
  • Access to the Bastion host must be limited to authorized users.
  • Limit user accounts and restrict account capabilities.
  • Only expose necessary ports to the public internet.
  • Keep the system up to date and be aware of security vulnerabilities.

Thank you for reading and please tell me if there are any mistakes I made or improvements that I can do to my article. 🫡

Bhagya Wijenayake

Software Developer | Shopify | React | Angular | Node.js | Next.js

2y

❤❤ nice work

Chirantha Jananath Thiwanka Kithulwatta

Lecturer and Head - Department of Information & Communication Technology, Uva Wellassa University (MPhil in Computer Science, BSc(Hons) in Software Engineering, Dip in HRM, CTHE, CFPM, MIEEE, MYSF, MIS, MSLAIHEE, MLKNOG)

2y

Nice article

Imasha Weerakoon

Software Engineer at Surge Global

2y

Nice work💪

Pasan Devin Jayawardene

Software Engineer - AI/R&D @ Insighture

2y

Nice work

Kasintha Kalhara

Senior Systems Engineer | Virtualization | Enterprise Backup | Server & Storage

2y

Great Hope to try it

To view or add a comment, sign in

More articles by Krishan Shamod

  • Getting Started with GitOps

    GitOps is a set of best practices that uses Git as the single source of truth for managing cloud-native application…

  • Database Disaster Recovery in Kubernetes

    This is part two of the “MySQL Group Replication in Kubernetes” article. You can find the first article here.

    2 Comments
  • Setup MySQL Group Replication in Kubernetes

    Setting up MySQL group replication is a very important task when it comes to the modern data-hungry world because most…

    5 Comments
  • Provision Azure Infrastructure using Terraform and GitHub Actions

    In this article, I will explain how to provision Azure infrastructure using Terraform and GitHub Actions. Before we go…

    3 Comments
  • Introduction to TMUX 😉

    Let’s say you want to run a time-consuming task on your Linux server. For example, you’re copying a few gigabytes to…

  • Migrate MySQL Database to the Amazon RDS

    First of all, our current database is stored in an EC2 instance. We are going to migrate it to Amazon Relational…

  • Reduce the size of your Docker images drastically

    In Docker, smaller containers lead us to run our applications more efficiently and securely. Also, those small…

Insights from the community

Others also viewed

Explore topics