

This way it is not necessary to explicitly select a subnet into which the bastion host should be launched.įurthermore, it gets the BastionHostSecurityGroup from this CloudFormation stack. The template uses the exported values for the public subnets to configure an autoscaling group.

This template assumes that the VPC to which the bastion host is launched has been set up via the CloudFormation template introduced in the previous blog post about VPC setup best practices.

To automate the task for launching a bastion host I’ve created a simple CloudFormation template. This way no-one needs to remember to clean up. Additionally, a bastion host should be automatically stopped after a certain amount of time. Ideally, it should be made as inconvenient as possible for anyone to actually launch a bastion host. Various Configuration Management tools - like Chef, Ansible, Puppet - can be used for changing server configuration.
SSH PROXY COMMAND AWS BASTION HOST MANUAL
Since it is a good practice to not rely on manual tasks for doing operations tasks on your machines it should only be necessary to actually log in to servers in rare cases. In simple words: If a server is not running it can not be attacked. For example, access could only be allowed from a certain part of a company network.įurthermore, a bastion host should only be launched when it is actually needed. This means that communication with this server should only be possible from certain networks or even hosts. Of course, access to the bastion host must be limited as much as possible. The single purpose of this server is to allow access from the outside and allowing to access to servers inside the network. The Bastion HostĪccessing the servers for operational tasks is done through a so-called bastion host or jump server. These load balancer are also hardened to further decrease the attack surface. A common service is a load balancer which routes traffic from the internet to web servers hosted in the private subnets. Therefore, this provides a first level of security by decreasing the attack surface.īut how can anyone access the applications for using or operating them?įor providing access to the applications special purpose servers or services would be set up in the public subnets. This way they can not be accessed from the public internet directly. It’s a best practice to launch servers hosting applications and storing data only into private subnets.
