Network security

What Is a Bastion Host? How It Works, Types and Setup in 2026

A bastion host is the one hardened door into a private network. Here is how it works, when to use one, and what to use instead.

Cysoro Security TeamPublished · 11 min read
PRIVATE NETWORK DB APP No public IP addresses GATE ADMIN NETWORK SECURITY Bastionhost One hardened door in.
Quick answer

A bastion host is a hardened, special-purpose server that sits between the internet and a private network and acts as the single authorized entry point for administrative access. Administrators connect to the bastion first, usually over SSH or RDP, and then hop from it to internal servers, which accept connections only from the bastion.

Key takeaways

  • A bastion host is the single hardened entry point to a private network, so internal servers need no public IP addresses.
  • It only works when it is minimal, patched, protected by MFA, and logging every session.
  • Managed alternatives such as AWS Session Manager and Azure Bastion remove the need to run your own bastion.

If every server in your network had a public IP address, every one of them would be a target. A bastion host fixes that by giving attackers exactly one door to find — and giving you exactly one door to defend.

What is a bastion host?

A bastion host is a hardened, special-purpose server that sits between the internet and a private network and acts as the single authorized entry point for administrative access. NIST defines it as a special-purpose computer on a network specifically designed and configured to withstand attacks.

The name comes from military architecture: a bastion is a projecting part of a fortification built to deflect and absorb attacks. In networking, the idea is the same. The bastion is the one outward-facing point deliberately designed to withstand attack while everything behind it stays protected.

Administrators connect to the bastion first, prove who they are, and then hop from it to the internal server they need. Internal servers accept administrative connections only from the bastion, never directly from the internet. Our guide to securing your Wi-Fi covers the same principle at home: shrink the number of ways in, then guard the ones that remain.

How does a bastion host work?

A bastion host works by forcing every administrative connection through one controlled hop: administrator to bastion, then bastion to internal server, with authentication, authorization, and logging at the bastion. No direct path exists from the outside to the servers behind it.

How a bastion host funnels admin accessAdministratorlaptop, MFASSH or RDPBastion hostpublic IP, DMZhardened, loggedPrivate serversno public IPbastion onlyStep 1: authenticate at the bastion. Step 2: hop to the target server.Step 3: every session is logged. No direct internet path to private servers.
Admin access flows through one hardened bastion host in a DMZ. Illustration by Cysoro.

The flow has four parts. First, the administrator connects to the bastion over SSH (port 22) or RDP (port 3389). Second, the bastion checks identity, usually with MFA or certificate-based authentication. Third, the administrator opens a second connection from the bastion to the target server. Fourth, the bastion records the session.

That recording matters. Because all admin traffic passes through one place, you get one complete audit trail: who connected, when, to which server, and what they did. JumpCloud notes that this turns dozens or hundreds of potential attack vectors into a single, heavily monitored entry point.

OpenSSH makes the hop nearly invisible to users with ProxyJump. The command ssh -J bastion-user@bastion-host internal-user@internal-server connects through the bastion in one step, without the administrator opening a separate interactive session on it.

JumpCloud describes a jump server as a hardened computer that acts as a controlled gateway between untrusted networks and sensitive internal resources, in its jump server guide.

Pomerium notes that a bastion host is not a load balancer and does not by itself authorize each downstream request, in its bastion host guide.

What are the main types of bastion host?

The main types are single-homed, dual-homed, and managed bastion hosts, plus privileged access management platforms that add session recording and just-in-time access. The right type depends on whether you run your own servers, a cloud VPC, or a mix of both.

TypeHow it is builtBest forWatch out for
Single-homedOne network interface, behind a firewallSmall networks with a firewall in frontFirewall rules must be exactly right
Dual-homedTwo interfaces, one public and one privateStrong separation between zonesMisconfiguration can bridge the networks
Cloud bastion (EC2)Hardened instance in a public subnetAWS VPCs with private subnetsYou patch and manage it yourself
Managed bastionCloud service, for example Azure BastionTeams that want no bastion to patchCost scales with use and region
PAM platformSession broker with recording and vaultingRegulated teams with many adminsHigher cost and setup effort

A single-homed bastion has one network interface and sits behind a firewall that decides what reaches it. A dual-homed bastion has two interfaces, one facing the outside and one facing the private network, and forwards traffic between them. Dual-homed designs give strong separation, but a routing mistake can accidentally bridge the two networks.

In the cloud, the classic pattern is a hardened EC2 instance in a public subnet, with a security group that allows SSH only from approved source IP ranges. Private instances accept SSH only from the bastion security group. Azure Bastion takes a different approach: Microsoft runs the bastion inside your virtual network, and you connect over TLS on port 443 from the Azure portal.

Why use a bastion host?

Use a bastion host when administrators need SSH or RDP access to servers that must never be reachable from the internet. It shrinks the public attack surface to one machine and concentrates authentication, authorization, and logging in one place.

The benefits are practical. You patch and monitor one exposed server instead of fifty. You can enforce MFA in one place instead of on every server. You can restrict access by source IP, time of day, and user in one place. And when an auditor asks who accessed a production database server last month, you have one log to check.

Common use cases include data-center administration, cloud VPCs with private subnets, access to systems holding payment card or health data, and industrial control systems where network isolation is a safety requirement. JumpCloud notes that PCI and HIPAA compliance work often relies on this kind of auditable, controlled access.

A bastion host is not a general-purpose server. It should not run your application, your database, or any other service. The smaller its attack surface, the better it does its one job.

What are the risks of a bastion host?

The biggest risk is concentration: a bastion host is a single point of failure and a high-value target. If it is compromised, the attacker gains a foothold with a path into your private network, so hardening and monitoring are not optional extras.

  • Compromise of the bastion itself. It is internet-facing by design, so it will be probed constantly. Unpatched software or a weak credential can turn it into an attacker's beachhead.
  • Stolen credentials. A password-only bastion is one phished password away from giving an attacker admin access. MFA and SSH keys are essential.
  • Single point of failure. If the bastion goes down, nobody can administer the servers behind it. Plan a redundant bastion or a documented emergency access procedure.
  • Insider misuse. A legitimate admin with broad access can do real damage. Least-privilege access, session recording, and log review limit that risk.
  • Configuration drift. A bastion that was hardened on day one can quietly accumulate extra services, users, and firewall rules. Regular audits catch drift before attackers do.

Another risk is over-trust. A bastion host authenticates the administrator, but it does not by itself authorize each downstream request or inspect what the administrator does on the target server. Pomerium makes this point clearly: limit its services, require strong authentication, record activity, and keep its privileges narrow.

How do you set up a bastion host?

Set up a bastion host by placing a minimal, patched server in a public subnet or DMZ, allowing inbound SSH or RDP only from approved source IPs, requiring MFA or SSH keys, and sending all session logs to a central store. Then block direct admin access to every server behind it.

Bastion host hardening checklist1. Minimal installRemove every service, package, and account you do not need.2. MFA and SSH keysNo passwords alone. Disable password login where possible.3. Source IP allowlistAllow SSH or RDP only from office and VPN ranges.4. Patch fastAutomate OS and SSH updates. Test the bastion first.5. Log everythingSession logs to a central store. Alert on failed logins.6. Block direct accessPrivate servers accept admin traffic only from the bastion.
Six hardening steps every bastion host needs before it goes live. Illustration by Cysoro.
  1. Put it in a DMZ or public subnet. The bastion is the only server with a public IP. Everything else sits in private subnets with no public route.
  2. Install the minimum. Remove unused services, packages, and user accounts. Follow a hardening benchmark such as the CIS benchmarks for your operating system.
  3. Require strong authentication. Use SSH keys or certificates plus MFA. Disable password-only SSH login, and disable SSH agent forwarding unless you specifically need it.
  4. Restrict the source. Allow inbound SSH or RDP only from your office IP ranges or your VPN. Never open port 22 or 3389 to the whole internet if you can avoid it.
  5. Lock down outbound access. The bastion should reach only the specific internal servers and ports administrators need, and nothing else.
  6. Log and alert. Send authentication and session logs to a central system, and alert on repeated failed logins or logins at unusual hours.
  7. Patch on a schedule. Because the bastion is exposed, patch it before the servers behind it, and test changes so you do not lock yourself out.
  8. Test the failure case. Confirm what happens if the bastion is down, and document how emergency access works.

On AWS, the equivalent firewall rules are security groups: the bastion security group allows SSH from trusted sources, and each private instance security group allows SSH only from the bastion security group. AWS guidance puts the rule plainly: the bastion host should remain the only source of SSH traffic to your Linux instances.

Never open RDP to the internetExposed RDP is a common entry point for ransomware. If you must use RDP through a bastion, restrict it by source IP, require MFA, and keep it patched — or use a managed service instead.

Bastion host vs VPN vs zero trust: what is the difference?

A bastion host controls access to specific servers through one hop, a VPN gives a device access to a network segment, and zero-trust access checks identity and context for every request to every resource. They solve overlapping problems in different ways, and many teams combine them.

Bastion hostVPNZero-trust access
What it grantsAdmin access to named serversNetwork access to a segmentAccess to one resource at a time
Who uses itAdministratorsAny remote workerAny user or service
AuthenticationAt the bastionAt the VPN gatewayPer request, with context
LoggingCentral, per sessionConnection-levelPer request and resource
Main weaknessSingle point of failureBroad access once connectedMore moving parts to run
Best whenFew admins, SSH or RDP onlyWhole team works remotelyMany apps, many users, no perimeter

A VPN is broader: once connected, a user can often reach many systems on the network, which is convenient and risky. A bastion is narrower: it exists for admin access to specific servers. Zero-trust access goes further by verifying identity, device, and context for each request, rather than trusting anyone inside the network.

In practice, a small team might use a bastion alone. A larger team often uses a VPN for general remote work and a bastion for production admin access. Teams moving to zero trust may replace the bastion entirely with an identity-aware proxy or a managed service.

What are the alternatives to a bastion host?

The main alternatives are AWS Systems Manager Session Manager, Azure Bastion, Google Cloud IAP TCP forwarding, and privileged access management platforms. Each removes some of the work of running your own bastion, at the cost of depending on a cloud provider or a vendor.

  • AWS Session Manager. AWS describes it as providing secure node management without the need to open inbound ports, maintain bastion hosts, or manage SSH keys. Access is controlled by IAM, and sessions can be logged.
  • Azure Bastion. A fully managed service inside your virtual network. You connect over TLS on port 443 from the Azure portal, with no public IP on the target virtual machines.
  • Google Cloud IAP TCP forwarding. Lets administrators reach private instances through Identity-Aware Proxy, with identity and context checks instead of a public SSH port.
  • Privileged access management (PAM). Platforms such as JumpServer or CyberArk add credential vaulting, just-in-time access, and full session recording on top of the jump-host idea.
  • Zero-trust network access. Identity-aware proxies check who you are, what device you use, and what you are allowed to reach, for each connection.

Choose a managed alternative when your team is small, your servers live in one cloud, or you do not want to own patching and monitoring for an exposed server. Keep a self-run bastion when you need a simple, cloud-neutral hop, or when your environment spans data centers and clouds that no single managed service covers.

If you already use a VPN, ask whether the bastion adds anything. The answer is usually yes for production servers, because the bastion adds per-server authorization and a single audit trail that a VPN alone does not provide.

What mistakes should you avoid with a bastion host?

The most common mistakes are opening the bastion to the whole internet, allowing password-only login, running extra services on it, and never reviewing its logs. Each one quietly removes the protection the bastion was supposed to provide.

  • Opening port 22 or 3389 to 0.0.0.0/0. Restrict by source IP. If your admins work from changing addresses, put a VPN in front of the bastion instead.
  • Reusing credentials. A bastion password that matches an admin's other logins is a single breach away from compromise. Use SSH keys plus MFA.
  • Letting it become a general server. The moment someone installs a web app or a file share on the bastion, its attack surface grows and its purpose blurs.
  • Skipping log review. Logs that nobody reads are decoration. Alert on failed logins, new keys, and off-hours access.
  • No backup access plan. Test what happens when the bastion is unavailable, before an outage forces you to improvise.
  • Forgetting offboarding. Remove an admin's bastion access the day they leave, and rotate any shared keys they could have copied.

For a wider starting point, our small business cybersecurity checklist covers access control, patching, and logging alongside the other basics a small team should get right first.

The bottom line

A bastion host is a simple, proven idea: one hardened door into a private network, guarded hard, with everything behind it unreachable from the internet. It works when you keep it minimal, protect it with MFA and SSH keys, restrict who can reach it, and log every session.

If you run servers in one cloud, check the managed alternative first — Session Manager on AWS or Azure Bastion may give you the same control without a server to patch. Either way, start by finding what is exposed today: run the free what-is-my-IP check and review which of your systems the internet can actually reach.

Frequently asked questions

What is a bastion host in simple terms?

A bastion host is a fortified front door for administrators. It is the one hardened server you connect to first, and from there you reach the private servers behind it. No other internal server is directly reachable from the internet.

Is a bastion host the same as a jump server?

The terms overlap heavily. A jump server is any intermediary machine you hop through to reach another network. A bastion host is a jump server that has been deliberately hardened, kept minimal, and monitored as a security control. Every bastion is a jump host, but not every jump host is a bastion.

Is a bastion host the same as a VPN?

No. A VPN gives a remote device access to a whole network segment, while a bastion host gives an administrator access to specific internal servers through one controlled hop. Many teams use both, and zero-trust access tools are increasingly used instead of either.

What port does a bastion host use?

Most SSH bastion hosts listen on TCP port 22, and most RDP bastion hosts use TCP port 3389. Many teams move SSH to a non-standard port, but that is obscurity, not security. Restricting the source IP addresses and requiring MFA matter far more.

Is a bastion host still relevant in 2026?

Yes, for teams that need direct SSH or RDP access to private servers. But the major clouds now offer managed alternatives, such as AWS Session Manager and Azure Bastion, that remove the need to run and patch your own bastion host.

What are the risks of a bastion host?

It concentrates risk in one place. If it is compromised, the attacker gains a foothold with access to internal systems. It is also a single point of failure, so plan redundancy or an emergency access procedure.

Do I need a bastion host on AWS?

Not necessarily. On AWS, a hardened EC2 instance in a public subnet is the classic pattern, but AWS Systems Manager Session Manager lets you reach private instances without opening inbound ports or managing SSH keys, and EC2 Instance Connect Endpoint offers another managed route.

Sources

  1. JumpCloud — What is a Jump Server / Bastion Host?
  2. Pomerium — Bastion Host: Definition and Guide
  3. Heimdal Security — What Is a Bastion Host? Types, Use Cases, and Safety Measures
  4. Formal — What is a bastion host?
  5. Safous — What Is a Bastion Host? How It Works, Examples & Alternatives
  6. JumpServer — What Is a Bastion Host? Architecture, Security Best Practices, and Complete Setup Guide
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against NIST's glossary definition of a bastion host, JumpCloud's jump-server guide, and Pomerium's bastion host guide.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free