---
title: Public Gateways - Quickstart
description: Learn how to quickly set up and configure a Public Gateway on Scaleway. Follow this step-by-step guide to manage internet access and secure your network with ease.
tags: private-network private network public-gateway public-gateway egress 
dates:
  validation: 2025-11-21
  posted: 2021-05-26
---
import Requirements from '@macros/iam/requirements.mdx'
import NetworkPublicGateways from '@macros/network/public-gateways.mdx'
import NetworkResourceNaming from '@macros/vpc/network-resource-naming.mdx'

## Console overview
Follow this guided tour to discover how to navigate the console.
<GuideFlow src="https://app.guideflow.com/embed/xrgn835i1p"/>

<NetworkPublicGateways />

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- Created a [Private Network](/vpc/how-to/create-private-network/)

## How to create a Public Gateway

1. Click **Public Gateways** in the **Network** section of the side menu.
2. Click **Create Public Gateway** to launch the Public Gateway creation wizard.
3. Complete the following steps in the wizard:
    - Choose an **Availability Zone**, which is the geographical location in which your Public Gateway will be created. Note that in order to attach a Public Gateway to a Private Network, the gateway must be in an Availability Zone within the Private Network's region.
    - Choose a **Public Gateway Type**, which impacts the pricing and bandwidth of your gateway.
    - Choose a public **IP**. You can choose to assign one of your existing flexible IPs to your Public Gateway, or create and assign a new public IP. 
    - Choose a **Name** for your Public Gateway, and, optionally, tags.
        <NetworkResourceNaming />
    - Verify the **Estimated Cost** of your Public Gateway, based on the specifications you chose.
4. Click **Create Public Gateway** to finish.

    Your Public Gateway is created and you are redirected to the **Public Gateways** dashboard, where your newly-created Public Gateway now displays.

## How to attach your Public Gateway to a Private Network

1. Click **Public Gateways** in the **Network** section of the [Scaleway console](https://console.scaleway.com) side menu. A listing of your Public Gateways displays.
2. Use the **region selector** at the top of the page to filter for the region of the Public Gateway you want to configure, then click the Public Gateway in the listing. The Public Gateway's **Overview** page displays.
3. Click the **Private Networks** tab. A list of Private Networks attached to the Public Gateway displays.
4. Click **Attach to a Private Network** to attach a new Private Network to the Public Gateway. A pop-up displays.
5. Select an existing Private Network from the list, or select **Create a new Private Network**.
    <Message type="note">
        Only Private Networks which are in the same region as the Public Gateway are displayed in this list.
    </Message>
6. Choose whether to **auto-allocate an available IP from the pool** (the [CIDR block](/vpc/concepts/#cidr-block) defined at the time of creating the Private Network), or use a **[reserved IP address](/ipam/concepts/#reserved-ip-address)** for the attachment.
7. Use the toggle <Icon name="toggle" /> to tell the gateway whether or not it should [advertise the default route](/public-gateways/concepts/#default-route) to the internet for attached resources. When activated, other resources on this Private Network will learn the default route through the Public Gateway via DHCP. The route will also be installed in the VPC’s route table, and other Private Networks can [opt in](/vpc/how-to/manage-routing/#how-to-manage-default-route-scope) to receive it. 
8. Click **Attach to Private Network** to finish. You are taken back to the Private Networks tab, where the network you attached now appears, along with the services configured and the IP address of the Public Gateway.

    Your Private Network is now attached to your Public Gateway. You can repeat the steps above to attach more Private Networks to the same Public Gateway if you wish.

## How to activate SSH bastion

When you activate SSH bastion on your Public Gateway, all [SSH keys held in your Project](https://console.scaleway.com/project/ssh-keys/) are imported to the SSH bastion. This provides a single point of entry to Instances and other resources behind the bastion, allowing you to connect to them via the Public Gateway, instead of via their public IP addresses.

1. Click **Public Gateways** in the **Network** section of the [Scaleway console](https://console.scaleway.com) side menu. A listing of your Public Gateways displays.
2. Use the **region selector** at the top of the page to filter for the region of the Public Gateway you want to configure, then click the Public Gateway in the listing. The Public Gateway's **Overview** page displays.
3. Under **SSH Bastion**, click **Enable SSH bastion**. A pop-up displays.
4. Enter the port that you want your SSH bastion to listen on (or leave the default port in place).
    <Message type="tip">
      The default port is `61000`. When setting your own port, you must choose a port number between `1024` and `59999`. The port that the SSH bastion listens on must not be a port already in use by a [NAT rule](/public-gateways/concepts/#nat).
    </Message>
5. Copy the command to connect to a resource, and click **Activate**.

    You are redirected to your Public Gateway's **Overview** page, where SSH bastion is now activated. All the SSH keys in your [Project credentials](/iam/concepts/#api-key) at the time of activation are copied to the SSH bastion. The command to use to connect to resources behind the bastion is displayed. See the [SSH bastion documentation](/public-gateways/how-to/use-ssh-bastion/) for further help, including information about restricting connections via the **Allowed IPs** feature.