The resource name can only include alphanumerical characters and dashes.
Public Gateways - Quickstart
Public Gateways sit at the border of Private Networks and provide extra functionality. They provide features like SSH bastion, and services to deal with traffic entering and exiting the network (NAT). You can add a Public Gateway to each of your Private Networks.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Created a Private Network
How to create a Public Gateway
-
Click Public Gateways in the Network section of the side menu.
-
Click Create Public Gateway to launch the Public Gateway creation wizard.
-
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.
Note
- Verify the Estimated Cost of your Public Gateway, based on the specifications you chose.
-
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
-
Click Public Gateways in the Network section of the side menu.
-
Click the Public Gateway that you want to attach to a Private Network. You are taken to the Overview page for that Public Gateway.
-
Click the Private Networks tab. A list of Private Networks attached to the Public Gateway displays.
-
Click Attach to a Private Network to attach a new Private Network to the Public Gateway. A pop-up displays.
-
Select an existing Private Network from the list, or select Create a new Private Network.
NoteOnly Private Networks which are in the same region as the Public Gateway are displayed in this list.
-
Choose whether to auto-allocate an available IP from the pool (the CIDR block defined at the time of creating the Private Network), or use a reserved IP address for the attachment.
-
Use the toggle «Toogle Icon» to tell the gateway whether or not it should advertise the default route to the internet for attached resources.
-
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 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.
-
Click Public Gateways in the Network section of the Scaleway console side menu.
-
Click the Public Gateway for which you want to activate SSH bastion. You are taken to the Overview page for that Public Gateway.
-
Under SSH Bastion, click the Activate button. A pop-up displays.
-
Enter the port that you want your SSH bastion to listen on (or leave the default port in place).
TipThe default port is
61000
. When setting your own port, you must choose a port number between1024
and59999
. The port that the SSH bastion listens on must not be a port already in use by a NAT rule. -
Copy the command to connect to a resource, and click Save SSH bastion settings.
You are redirected to your Public Gateway’s Overview page, where SSH bastion is now activated. All the SSH keys in your Project credentials 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 for further help.