Configure Source IP Ranges for Your VMware Cloud Director Instance
You can restrict the access to a VMware Cloud Director instance by configuring a list of source IP addresses and CIDR blocks to have access to it.
When you configure a list of
allowed IP addresses for a VMware Cloud
Director instance, they obtain exclusive access to the instance. For
all other IP addresses, access to the VMware Cloud
Director instance is denied. If you attempt to access the instance
from an IP address that is not in the list, this results in a
403
Forbidden
error.Prerequisites
- Verify that you are assigned the Provider Administrator role.
- Obtain an API token from the
organization you want to manage and exchange it for an access bearer token. Use
the bearer token in the
Authorization
header when you run API calls. See How Do I Generate an API Token.
Procedure
Example: Configure an IP address to access your VMware Cloud Director instance
This example configures one IP address with access to a VMware Cloud Director instance.
POST https://vcdc-operator-prod-us-west-2.vdp.vmware.com/environments/urn:vcdc:environment:00000000-0000-0000-0000-00000000000/instances/urn:vcdc:vcdInstance:22222222-2222-2222-2222-222222222222/operations/configureSourceRanges
Use the bearer token in the
Authorization
header of the request.
Authorization: Bearer eyJh…I1NiIs
Enter the required information in the
POST request. Leave the value for the
deniedSourceAddresses
attribute
empty.{ "allowedSourceAddresses": "41.9.03.192", "deniedSourceAddresses":""}
The response returns the following details about the instance and the access to
it.
{ "id": "urn:vcdc:task:22222222-2222-2222-2222-22222222222", "name": "Configure source IP ranges", "entityId": "urn:vcdc:vcdInstance:33333333-3333-3333-3333-33333333333", "entityName": "VMware-Cloud-Director-test", "ownerId": "urn:vcdc:organization:12345678-1234-1234-1234-123456789abc", "userId": "[email protected]", "cspUserId": "vmware.com:87654321-4321-1234-4321-987654321abc", "steps": null, "status": "IN_PROGRESS", "startTime": null, "endTime": null, "queuedTime": "2023-04-04T05:32:42.050046427Z", "message": "Configure source IP ranges.", "isolation": "ENTITY_EXCLUSIVE", "output": null, "activity": "activity://com.vmware.vcdc.coordinator.domain.activity.ManageCdiIngressAnnotationsActivity/87654321-4321-1234-4321-987654321abc/CONFIGURE_SOURCE_RANGES/12345678912345"}