Creating a private network with Gateway (EN)

Discover how to create a Private network with a Gateway

Last updated 2nd November 2022


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.

Learn how to create a private network with a gateway.



Via the OVHcloud Control Panel

Click on the tabs below to view each of the 6 steps in turn.

Log in to your 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 on Create a Gateway.

gateway creation

First, select your gateway size.

gateway size selection

Size Bandwith Cost
S up to 200Mbps 2€/month, excluding tax
M up to 500Mbps 8€/month, excluding tax
L up to 2Gbps 35€/month, excluding tax

In the next step, select a location. It is best to create a Public Gateway in the region where you intend to deploy your private instances.

select location

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 an existing private network. Be aware that only single-region private networks are supported by Gateway.


Otherwise, click on Add a private network to create a new one (in simplified dialog box with predefined values).

create private network

In our example, a private network does not exist yet in the region we selected, so we create a new one.

In the popup window, enter a name for your private network, select a subnet and click on Add.

create private network

Once the network has been added, click on Create a gateway.

create 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.

To view your newly created private network, click on Private Networks in the left-hand menu under Network.

new private network

You can view the new gateway in the Gateway section.

new private network

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:

openstack network create my_network

openstack subnet create my_subnet --subnet-range <my_private_ip_range/mask> --network my_network --no-dhcp

openstack router create my_router

openstack router add subnet my_router my_subnet

openstack router set --external-gateway Ext-Net my_router

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.

This call retrieves the list of projects.

This call identifies the project via the "description" field.

Create your private network and gateway

Fill in the fields according the following table.

Field Description
serviceName 'The ID of your project'
regionName Example: GRA9
model size of your gateway (l, m ,s) 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

Join our community of users on

¿Le ha resultado útil esta guía?

Si lo desea, también puede enviarnos sus sugerencias para ayudarnos a mejorar nuestra documentación.

Imágenes, contenido, estructura...: ayúdenos a mejorar nuestra documentación con sus sugerencias.

No podemos tratar sus solicitudes de asistencia a través de este formulario. Para ello, haga clic en "Crear un tíquet" .

¡Gracias! Tendremos en cuenta su opinión.

Otras guías que podrían interesarle...

OVHcloud Community

¡Acceda al espacio de la OVHcloud Community! Resuelva sus dudas, busque información, publique contenido e interactúe con otros miembros de la comunidad.

Discuss with the OVHcloud community

A partir del 1 de enero de 2015, con arreglo a la Directiva 2006/112/CE modificada, los precios IVA incluido pueden variar según el país de residencia del cliente (por defecto, los precios con IVA incluyen el IVA español vigente).