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.
- 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)
Via the OVHcloud Control Panel
Log in to your OVHcloud Control Panel and open your
Public Cloud project.
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.
Configure and create your private network and gateway.
- Select the size (S, M, or L).
- Select the region. It is best to create a Public Gateway in the region where you intend to deploy your private instances.
- Name your gateway and select a private network. Be aware that only single-region private networks are supported by Gateway.
You can also add a new private network. Click on
Add a private networkto create one.
In the pop-up window, enter a name for your private network, select a subnet, and click on
- Once the network has been added, click on
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.
To view your newly created private network, click on
Private Networks in the left-hand menu under Network.
You can view the new gateway in the
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 to the following table.
|'The ID of your project'
|size of your gateway (l, m ,s) depending on your needs
|set a name for your gateway, you can click on the dropdown arrow and select "null" for a default one
|set a name for your private network, you can click on the dropdown arrow and select "null" for a default one
|IP block for your subnet
|check the box for yes
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.
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: