Skip to Content
Open Beta — managed Kubernetes, DNS & more are live.
🚪

External gateways

Updated 2026-11-20
On this page

External gateways

An external gateway is your router's connection to the public IPv4 network. It is what makes outbound internet access and floating IPs possible, and it is a chargeable resource.

A router with no external gateway has no presence on the public network at all. Instances behind it can talk to each other and to other subnets on the same router, but they cannot reach the IPv4 internet outbound, and no floating IP can be associated with them.

Attaching a gateway unlocks both directions at once. Outbound, every instance behind the router shares the router's public address through SNAT, which is what lets them fetch updates and call external APIs. Inbound, the router can now translate a floating IP to an instance's fixed address.

Screenshot — The router detail page showing the external gateway and the public network it is attached to
The router detail page showing the external gateway and the public network it is attached to

Key concepts

External gateway — The router's attachment to the public network. One per router.

SNAT — Outbound translation: instances behind the router share its public address when they reach the internet.

External network — The provider network that carries internet-routable addresses. You attach to it, you do not create it.

Chargeable resource — A resource that appears on a quota request and is billed while it exists, rather than one that comes free with the project.

Before you start

  • A router serving the subnet whose instances need internet access.
  • Available external gateway allocation in the project.

Step by step

  1. Open the router

    Go to Networking > Routers and open the router that serves your subnet.

    Screenshot — The router list
    The router list
  2. Attach the gateway

    Set the external gateway on the router, choosing the public network.

    Screenshot — The set-gateway dialog with the external network selected
    The set-gateway dialog with the external network selected
  3. Confirm outbound access
    • Connect to an instance behind the router.
    • Reach an external address to confirm SNAT is working.
  4. Add floating IPs as needed

    With the gateway in place, floating IPs can now be associated with instances behind this router.

  5. Detach when it is no longer needed

    Removing the gateway stops the charge, and also stops all outbound internet access and breaks every floating IP behind that router.

Examples

Attach an external gateway to a router
patrii router set-gateway prod-router --network public
Check whether a router already has one
patrii router list
patrii router show <router-id>

Limits & specifications

What the gateway does and does not cover:

CapabilityNeeds a gateway?
Instances talking to each other on the same routerNo
Outbound access to the internet (SNAT)Yes
Associating a floating IPYes
A second gateway on the same routerNot supported. One per router.

Best practices

  • Put the instances that need internet access behind one router and share a single gateway, rather than giving each its own router.
  • Attach a gateway only when a subnet behind the router genuinely needs internet access.
  • Detach the gateway when a project is idle: it is billed while it exists, not while it is used.
  • Check for an existing gateway before adding a router, since a floating IP that will not associate is usually a missing gateway.

FAQ

Why is the external gateway charged rather than included?
Because it reserves public IPv4 capacity. The global IPv4 supply is exhausted, blocks have to be acquired and maintained, and every router attached to the public network holds capacity on it whether or not traffic is flowing. The charge covers that reservation and the NAT and routing that carry your traffic.
Do I pay per instance?
No. One router with one gateway serves every instance behind it and every floating IP associated through it. Consolidating onto fewer routers is the way to reduce this cost.
My floating IP will not associate. What is wrong?
Almost always the router serving that instance's subnet has no external gateway. The translation happens on the router, so without a foot on the public network there is nowhere to route to. Check the router first, then the security group, then the quota.

Learn more

Everything you can do here in the console is also available through the Patrii Cloud API for automation and scripting.

Was this article helpful?
Thank you for your feedback. Still stuck? Contact us