Accessing OBS
Scenarios
This section describes how to access OBS using a VPN connection or a direct connection.
Only in the LA-Mexico City1, LA-Sao Paulo1, and LA-Santiago regions, can OBS be configured as a gateway VPC endpoint service.
Prerequisites
- The local subnet of the VPC that interconnects with your VPN contains the OBS CIDR block 100.125.0.0/16.
For details about how to create a VPN connection, see Creating a VPN Gateway.
- The CIDR block of the virtual gateway associated with your direct connection contains the OBS CIDR block 100.125.0.0/16.
For details on how to enable Direct Connect, see Enabling Direct Connect.
Procedure
- Click
in the upper left corner and select the required region and project. - Click Service List and choose Networking > VPC Endpoint.
- In the navigation pane on the left, choose VPC Endpoint > VPC Endpoints.
- On the displayed page, click Buy VPC Endpoint.
- Set Service Category to Cloud Services and select com.myhuaweicloud.na-mexico-1.dns.
- Configure the parameters as prompted. Figure 1 Buy VPC Endpoint (Service Category set to Cloud service)
- Click Next and Submit.
- Check the private IP address returned after the VPC endpoint for connecting to DNS is created.
- Add DNS records on the DNS server at your local data center to forward requests for resolving the OBS domain name to the DNS VPC endpoint.
The following uses DNS Bind as an example:
Method 1: In file /etc/named.conf, add the DNS forwarder configuration and set forwarders to the IP address of the DNS server.
options { forward only; forwarders{ xx.xx.xx.xx;}; };Method 2: In file /etc/named.rfc1912.zones, add the following content and set forwarders to the IP address of the DNS server.
Take the OBS endpoint in region LA-Mexico City1 as an example:
zone "com.myhuaweicloud.na-mexico-1.obs" { type forward; forward only; forwarders{ xx.xx.xx.xx;}; };
- If no DNS server is available, add the IP address of the DNS VPC endpoint in file /etc/resolv.conf on a node at your local data center.
- xx.xx.xx.xx indicates the IP address returned in step 9.
- Configure a DNS route from the offline node to the Direct Connect or VPN gateway.
xx.xx.xx.xx indicates the private IP address of the VPC endpoint for accessing DNS. Therefore, the traffic from the node to OBS needs to be directed to the Direct Connect or VPN gateway, and then to OBS through Direct Connect or VPN. Configure a permanent route at your local data center and specify the Direct Connect or VPN gateway as the next hop for accessing OBS.
route -p add xx.xx.xx.xx mask 255.255.255.255 xxx.xxx.xxx.xxx
- xx.xx.xx.xx indicates the IP address returned in step 9.
- xxx.xxx.xxx.xxx indicates the IP address of the Direct Connect or VPN gateway created at your local data center.
- Repeat steps 5 to 9 to create a VPC endpoint for connecting to OBS.
You can only access OBS using the OBS domain name in the region where the VPC endpoint is located.
- Configure an OBS route from your local data center to the Direct Connect or VPN gateway.
The IP address of OBS belongs to 100.125.0.0/16. Therefore, traffic from the data center to OBS needs to be directed to the Direct Connect or VPN gateway, and then to OBS through Direct Connect or VPN.
Configure a permanent route at your local data center and specify the IP address of the Direct Connect or VPN gateway as the next hop for accessing OBS.
route -p add 100.125.0.0 mask 255.255.0.0 xxx.xxx.xxx.xxx
If your local data center is disconnected from the Direct Connect gateway or a VPN gateway, a connection between the offline node and the gateway must be established first.
Last Article: Managing Tags of a VPC Endpoint
Next Article: Permission Management
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.