The Azure Bastion and AWS Session Manager equivalent in GCP

Google Cloud has no bastion service to deploy. What Azure Bastion and AWS Systems Manager Session Manager do there, Identity-Aware Proxy (IAP) TCP forwarding does here: IAP checks IAM for the user and the VM, then carries SSH, RDP or any other TCP port in HTTPS to the VM's internal address. The VM needs no external IP and no agent for the tunnel, only a firewall rule that admits 35.235.240.0/20. OS Login covers the identity side that Session Manager handles with IAM policies: Linux accounts tied to Google identities, with or without sudo. Google lists IAP's protection of Google Cloud resources at no charge. On 10 November 2026 we reached a VM with no external IP this way in 3.7 seconds, and IAP logged the session in Cloud Audit Logs.

By Ostgate · Updated

Azure Bastion, AWS Session Manager and GCP IAP side by side

Each cell comes from the vendor's own documentation or price list, read on 10 November 2026. Azure prices are Microsoft's retail list prices for East US.

Azure BastionAWS Session ManagerGCP: IAP TCP forwarding + OS Login
What it is A managed service deployed into your virtual network; RDP and SSH over TLS from the portal or a native client A Systems Manager tool: a shell in the browser or the AWS CLI, plus port forwarding IAP wraps SSH, RDP or any TCP port in HTTPS and checks IAM per user and VM; OS Login maps Google identities to Linux accounts
Agent on the VM None SSM Agent 2.3.68.0 or later None for the tunnel; OS Login and the console's SSH button use the guest environment, preinstalled on VMs from most Google public images
What you deploy A Bastion host in AzureBastionSubnet with a public IP (Basic, Standard, Premium); Developer runs on shared infrastructure; Premium can be private-only The agent on each node Nothing: a firewall rule and IAM roles
Ports open toward the VM 22 and 3389 from AzureBastionSubnet; you reach Bastion on 443 No inbound ports 22, 3389 or the forwarded port, from 35.235.240.0/20 only
In the browser HTML5 client in the Azure portal, every SKU; Chrome or Edge on a Mac Shell in the console; RDP in Fleet Manager Remote Desktop, up to four connections per browser window SSH button in the console for Linux; no browser RDP
Native client Standard and Premium only, through the Azure CLI (az network bastion) AWS CLI with the Session Manager plugin on Windows, macOS or Linux; RDP by forwarding 3389 gcloud compute ssh and gcloud compute start-iap-tunnel; IAP Desktop on Windows 10 and 11
Audit BastionAuditLogs resource logs; recording of graphical sessions on Premium, not for native client connections CloudTrail for API calls; session data to S3 or CloudWatch Logs, except for port forwarding and SSH sessions Data Access audit log entry per tunnel (AuthorizeUser), off by default; the IAP and OS Login pages describe no session recording
Who pays what Developer free; Basic 0.19, Standard 0.29, Premium 0.45 USD an hour, billed from deployment until deletion; Standard and Premium include 2 instances The price list shows no Session Manager charge for EC2; 0.05 USD per session on hybrid and multicloud nodes since 30 September 2026; standard data transfer rates IAP “at no charge” for Google Cloud resources; load balancing charges apply where one is required, and Google's TCP forwarding setup has none

Sources: Azure Bastion overview, NSG access, native client, Azure Bastion pricing; Session Manager, its prerequisites, Fleet Manager Remote Desktop, Systems Manager pricing; Use IAP for TCP forwarding, OS Login, IAP pricing.

Coming from Azure Bastion

There is no host to size and no hourly bill. Azure Bastion “is billed hourly from the moment the resource is deployed until the resource is deleted, regardless of outbound data usage” (Azure Bastion pricing). IAP is a Google service you reach over HTTPS, and the VM's firewall only has to admit IAP's range. Access works per VM in both clouds: Azure asks for Reader on the VM, its NIC and the Bastion resource; Google lets you grant the tunnel role on one VM.

Browser RDP doesn't carry over. Google's Windows page recommends IAP “Then use IAP Desktop (on Windows) or the Google Cloud CLI in combination with an RDP client”, and “If you cannot use Identity-Aware Proxy TCP forwarding, use Chrome Remote Desktop”, a service you install on the VM (Connect to Windows VMs by using RDP). Bastion Premium's session recording has no counterpart in the IAP and OS Login pages either.

Coming from AWS Session Manager

Nothing to install or keep updated on the VM. “The IAP proxies connect to the primary internal IPv4 address of nic0 on the VM” (Use IAP for TCP forwarding), so the tunnel ends at the VM's own sshd or Remote Desktop service. In exchange, the VM needs one inbound firewall rule, from Google's IAP range only, where Session Manager needs “no open inbound ports”.

Identity works much like Session Manager's IAM policies. With OS Login, “Google checks permissions for every login attempt”, and the role decides sudo: roles/compute.osLogin “grants login access without sudo access”, roles/compute.osAdminLogin “with sudo access” (OS Login). OS Login can also require 2-step verification at login. It doesn't run on Windows Server images.

Logging differs most. Session Manager can keep a shell session's data in S3 or CloudWatch Logs, though “Logging isn't available for Session Manager sessions that connect through port forwarding or SSH” (Session Manager). IAP's audit entry records who opened a tunnel to which VM and port; the one we got carries nothing typed in the session (below).

Firewall rule and IAM roles

Admit IAP's range on the ports you use. For IPv6 VMs Google gives 2600:2d00:1:7::/64 as well:

gcloud compute firewall-rules create allow-ingress-from-iap \
    --project=acme-prod --network=NETWORK \
    --direction=INGRESS --action=allow \
    --rules=tcp:22,tcp:3389 \
    --source-ranges=35.235.240.0/20

Google warns that “the default-allow-ssh and default-allow-rdp default rules allow SSH and RDP connections from all IP addresses, not only from IAP”, so delete or disable them if your network has them.

Turn on OS Login for a Linux VM (or project-wide in project metadata):

gcloud compute instances add-metadata example-vm \
    --project=acme-prod --zone=europe-west1-b \
    --metadata=enable-oslogin=TRUE

Then the roles, scoped to one VM. “To grant a user or group access to a specific VM, you grant the roles/iap.tunnelResourceAccessor role on that VM” (Use IAP for TCP forwarding). gcloud has no command for that binding, so use the console: on the IAP admin page, open the SSH and TCP Resources tab, select the VM, click Add principal and pick Cloud IAP › IAP-Secured Tunnel User. Add condition can narrow it to one port with destination.port == 22. The OS Login role goes on the same VM:

gcloud compute instances add-iam-policy-binding example-vm \
    --project=acme-prod --zone=europe-west1-b \
    --member=user:alex@example.com \
    --role=roles/compute.osLogin

If the VM runs as a service account, the user also needs roles/iam.serviceAccountUser on it, and OS Login warns that “that user can use all of the IAM permissions granted to the service account attached to the VM”. Google's roles table also lists Compute Instance Admin (v1) on the project for SSH access, and sends OS Login users to the OS Login roles instead.

The free ways to connect

The SSH button in the console

On a Linux VM's row in Compute Engine, SSH opens a terminal in a browser window. “When you use SSH-in-browser to connect to an instance that has only an internal IP address, SSH-in-browser uses IAP TCP forwarding”, so it needs the firewall rule above. Google lists two limits that matter here: it is “not supported within VPC Service Controls perimeters”, and key transfer takes “2 to 25 seconds” (SSH-in-browser).

gcloud compute ssh through IAP

gcloud compute ssh example-vm --tunnel-through-iap \
    --project=acme-prod --zone=europe-west1-b

We ran it on 10 November 2026 with Google Cloud SDK 590.0.0 on a Mac, against a Debian 12 VM with no external IP and OS Login on, with a command instead of a shell:

WARNING:

To increase the performance of the tunnel, consider installing NumPy. …

Linux 6.1.0-54-cloud-amd64
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
alex_example_com

The command took 3.7 seconds from start to exit. The user name is the OS Login account built from the Google account's email address. Without --tunnel-through-iap, gcloud uses IAP only when the VM has no external IP.

RDP with gcloud compute start-iap-tunnel

gcloud compute start-iap-tunnel example-win 3389 \
    --local-host-port=localhost:13389 \
    --project=acme-prod --zone=europe-west1-b

Leave it running and point an RDP client at localhost:13389. The same command forwards any other TCP port, such as a database. IAP “automatically disconnects sessions after one hour of inactivity”, and gcloud then tries to bring the tunnel back (Use IAP for TCP forwarding). We didn't run this one: the test project had no Windows VM running. On a Mac, Google Cloud RDP from a Mac covers the client side.

IAP Desktop on Windows

IAP Desktop is “an open-source Remote Desktop and SSH client” for Windows 10 and 11 that connects through IAP TCP forwarding. Google's docs list it next to gcloud and add that it is “not an officially supported Google product”. For a Mac, IAP Desktop for Mac covers the options.

The audit trail

IAP writes tunnel authorizations to the Data Access audit log, and “Except for BigQuery, Data Access audit logs are disabled by default” (Cloud Audit Logs). Once they are on for IAP in the VM's project, query Logs Explorer:

protoPayload.serviceName="iap.googleapis.com"
protoPayload.methodName="AuthorizeUser"

Our test project had them on. The SSH session above produced one entry three seconds after the command started, trimmed:

"logName": "projects/acme-prod/logs/cloudaudit.googleapis.com%2Fdata_access",
"methodName": "AuthorizeUser",
"authorizationInfo": [{"granted": true, "permission": "iap.tunnelInstances.accessViaIAP", …}],
"requestMetadata": {"destinationAttributes": {"ip": "10.0.0.2", "port": "22"}, …},
"metadata": {"iap_tcp_session_info": {"phase": "SESSION_START"}, …},
"resource": {"type": "gce_instance", …}

The entry also carries the user's email under authenticationInfo and the caller's IP. In the next six minutes no entry for the end of the session arrived.

How Ostgate does it

Ostgate is our Mac app for the same IAP route. It “needs no gcloud, no agent on your instances and no public IP addresses” (install docs). Its welcome screen lists what each VM's project needs: the firewall rule from 35.235.240.0/20 and the Compute Viewer and IAP-secured Tunnel User roles. You sign in with Google in your own browser, and several accounts work side by side.

  • Double-click an instance to connect the right way for its OS: a terminal tab over an IAP tunnel for Linux, Remote Desktop in a tab for Windows, with no separate RDP client.
  • The SSH key is generated on your Mac, in the Secure Enclave where available, and published through OS Login or instance metadata, chosen per instance the way gcloud chooses. VMs that require OS Login certificates get one from Google for five minutes, kept in memory only.
  • New Tunnel… forwards any port of an instance to 127.0.0.1, for a database client or a web UI.
  • When a stage of a connection fails, Connection Doctor names the cause, such as a missing IAM role, a missing firewall rule or a stopped instance, and gives a command to fix it.

The SSH docs and Remote Desktop docs have the details.

What you look for and where it is in GCP

On Azure or AWS you useIn GCPWhere
A Bastion host or a bastion EC2 instance IAP TCP forwarding; no VM to run Firewall rule and IAM roles
Reader on the VM and NIC, or an IAM policy on the instance roles/iap.tunnelResourceAccessor on the VM IAP page, SSH and TCP Resources
Who gets sudo or local admin roles/compute.osLogin or osAdminLogin (Linux) OS Login
RDP in the browser None from Google; a local RDP client through a tunnel start-iap-tunnel, IAP Desktop
Port forwarding to a database gcloud compute start-iap-tunnel VM PORT Port forwarding over IAP
BastionAuditLogs or CloudTrail AuthorizeUser in Data Access audit logs, off by default The audit trail
The connection fails An IAP error code such as 4003 or 4033 IAP tunnel errors

Questions

Does GCP have a bastion service?

Not one you deploy. Identity-Aware Proxy TCP forwarding does the job: IAP checks IAM for the user and the VM, then carries SSH, RDP or another TCP port in HTTPS to the VM's internal address. The VM needs no external IP, only a firewall rule that admits 35.235.240.0/20 on the ports you use. OS Login ties Linux accounts and sudo to IAM roles.

Is IAP free?

Google's IAP pricing page says IAP's features for protecting Google Cloud-hosted resources come at no charge, and that networking and compute charges apply for required load balancing. TCP forwarding to a VM needs a firewall rule and IAM roles, and no load balancer appears in Google's setup steps. Data Access audit logs, if you turn them on, are written to Cloud Logging in the VM's project.

Can I RDP through IAP from a browser?

Google's Windows connection page lists no browser RDP through IAP. It suggests IAP Desktop on Windows, or gcloud compute start-iap-tunnel with an RDP client, and Chrome Remote Desktop, a service you install on the VM, when IAP TCP forwarding isn't possible. The console's SSH button is a browser terminal for Linux VMs. Azure Bastion's portal client and AWS Fleet Manager Remote Desktop both run RDP in the browser.

Do I need an agent on the VM, like SSM Agent?

Not for the tunnel: IAP connects to the primary internal IPv4 address of the VM's first network interface, on the VM's own SSH or RDP port. OS Login and the console's SSH button rely on the guest environment, which Google installs on VMs created from most of its public images.

Ostgate runs on Apple Silicon Macs with macOS 15 or later, with a 7-day trial and no sign-up. Setup is in the Google Cloud setup docs.