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.
Learn how to create a private network with a gateway.
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 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
Step 1
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.
Step 2
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 (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
For more information and tutorials, please see our other Public Cloud support guides or explore the guides for other OVHcloud products and services.