Learn how to create a private network with a gateway.
A Gateway offers a secure outbound connection method from your private network instances or the ability to use Floating IPs with your instance or Load Balancer for service exposition.
This can be created via the OVHcloud Control Panel, the OpenStack API, or the OVHcloud API.
Requirements
- A Public Cloud project in your OVHcloud account
- Access to the OVHcloud API, the OVHcloud Control Panel, or the OpenStack command line environment (Tutorial)
- The OpenStack Command Line Interface tool installed on your working environment (optional)
Instructions
Via the OVHcloud Control Panel
Log in to the OVHcloud Control Panel and open your Public Cloud
project.
Click on Gateway
in the left-hand menu under Network.
Please note that you need to have activated the vRack before proceeding. If you do not have a vRack, please consult this section of the relevant guide.
Next, click Create a Gateway
.
First, select a location. It is best to create a Public Gateway in the region where you intend to deploy your private instances.
Select your gateway size.
The next step allows you to edit the default name of your gateway and attach a private network to it. You can use the drop-down list to Select a private network
. Be aware that only single-region private networks are supported by Gateway.
Otherwise, click on Add a private network
to create one (in a simplified dialog box with predefined values).
In the pop-up window, enter a name for your private network, select a subnet, and click Add
.
Once the network has been added, click Create a gateway
.
The creation may take several minutes, you may need to refresh the page after a couple of minutes to display the new service.
Once the creation is done, you now have a private network linked to a public gateway.
You can view the new gateway in the Gateway
section.
To view your newly created private network, click on Private Networks
in the left-hand menu under Network.
Via Terraform
Before proceeding, it is recommended that you consult our How to Use Terraform guide.
Once your environment is ready, you can create a Terraform file called 'private_network_simple.tf' and write the following:
You can create your resources by entering the following command:
Via the OpenStack API
Before proceeding, it is recommended that you consult these guides:
Once your environment is ready, type the following at the command line:
List the quality of service available.
If you omit the --qos-policy
parameter the "small" quality of service will be applied.
Via the OVHcloud API
Log in to the OVHcloud APIv6 interface according to the relevant guide (First steps with the OVHcloud API).
In case the project ID is unknown, the calls below allow you to retrieve it.
To retrieve a list of projects:
To identify the project via the "description" field:
Create your private network and gateway:
Fill in the fields according to the following table.
Field | Description |
---|---|
serviceName | 'The ID of your project' |
regionName | Example: US-VA-EAST-1 |
model | size of your gateway (s, m, l, xl, 2xl) depending on your needs |
name | set a name for your gateway, you can click on the dropdown arrow and select "null" for a default one |
name | set a name for your private network, you can click on the dropdown arrow and select "null" for a default one |
cidr | IP block for your subnet |
enableDhcp | check the box for yes |
ipVersion | 4 |
The VLAN identifier (vlanId) is required if you want to create a specific VLAN. You can enter a value (between 2 - 4000) or leave it empty. If left empty, the system will automatically assign one by default.
This is the step of creating the private network and gateway by region.
You will need to do the same for each region where your private instances are present.
The creation will take a few minutes.
To verify the details of your gateway, you can use the following API call:
Go further
For more information and tutorials, please see our other Public Cloud support guides or explore the guides for other OVHcloud products and services.