liveBook · Manning

Bastion host

As explained in Secure APIs

A bastion server is a hardened intermediary host that provides controlled access to systems on an otherwise private network.

A bastion host is a specially hardened intermediary server that provides controlled access to private networks through a demilitarized zone (DMZ). It acts as a bridge without exposing sensitive databases or internal APIs directly to the internet. section 9.2

Place databases and internal APIs in private subnets, then permit access through the bastion host when outside access is necessary. This reduces direct exposure and supports network segmentation, but the host itself remains a security-sensitive entry point. section 9.0 section 9.2

A practical bastion-host design typically includes:

  • A position in the DMZ or another internet-connected network, bridging toward private systems. section 9.2
  • Hardened configuration with inbound SSH restricted to port 22 and a small allowlist of trusted IP addresses. section 9.2
  • Tunneled connections from an authorized local machine to private databases or internal APIs. section 9.2

Private database access

Keep a payment database in a private subnet rather than exposing it to the internet. An authorized operator connects through the bastion host, which tunnels the connection to the database. The same pattern can provide controlled access to internal or developmental APIs. section 9.2

Figure 9.11 A bastion server gives us access to an internal network. We use bastion servers to access internal or private APIs and databases. The bastion server sits in the DMZ and is hardened to allow traffic only from certain origins.
figure

Use the network diagram to see the bastion host in the DMZ and the restricted path to internal APIs and databases. section 9.2

How Secure APIs covers it

How deep it goes
Explains placement, tunneling, SSH restrictions, trusted origins, and private-subnet rationale without detailing hardening procedures.
Examples
Uses tunneled database access, private API access, DMZ diagrams, and API gateway combinations as concrete illustrations.
What it assumes
Assumes familiarity with network segmentation, DMZs, private subnets, SSH, databases, and internal APIs.
What you can do after
Operate/configure controlled paths from trusted origins to private databases and internal APIs through a hardened SSH intermediary.
How it connects
Connects bastion hosts with network segmentation, DMZs, private subnets, SSH, databases, internal APIs, API gateways, and lateral movement.

Also explained in

Compare how 2 books explain bastion host →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secure APIs. The section links point to the parts of the book it draws on.