Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

VPN/Direct Connect Access

Updated on 2024-10-14 GMT+08:00

Scenario

If your local data center or private network cannot access SWR through a public network, you can use Direct Connect or VPN to connect to Huawei Cloud VPC and use a VPC endpoint to access SWR.

This solution applies only to pushing images through SWR. To pull images, you also need to configure a VPC endpoint for accessing OBS using the OBS private address.

Procedure

  1. Create a VPC. For details, see Creating a VPC.
  2. Create a Direct Connect connection or VPN so that the data center can connect to the VPC through Direct Connect or VPN.
  3. Buy a VPC endpoint.

    a. Log in to the management console.

    b. Click at the upper left corner and select the desired region and project.

    c. In the Service List at the upper left corner, choose Networking > VPC Endpoint.

    d. On the displayed page, click Buy VPC Endpoint.

    e. Configure the parameters as prompted.

    f. Click Next.

    g. Confirm the order details and click Submit.

  4. Obtain the private network IP address and domain name for accessing the VPC.

    NOTE:

    By default, the domain name resolution rule is automatically added to Huawei Cloud VPCs.

    You only need to configure hosts for non-Huawei Cloud endpoints.

    a. Go to the endpoint list.

    b. Locate the purchased endpoint and click the endpoint ID to go to the details page.

    c. On the page displayed, you can view the IP address and private network domain name of the endpoint.

    Figure 1 Endpoint details page

  5. Configure hosts of the local data center. The hosts IP address consists of the IP address and private network domain name of the endpoint. Example:

    Figure 2 Example hosts
    CAUTION:

    In this section, 172.xx.xx.xx swr.ap-southeast-1.myhuaweicloud.com is only an example. Replace it with the actual IP address and private network domain name.

    There are two configuration methods:

    Configuring Hosts for Linux

    Customizing DNS Hosts

    • Configuring Hosts for Linux:
    1. Run the following command to open the /etc/hosts file:
      sudo vim /etc/hosts
    2. Add a custom domain name in the format of xx.xx.xx.xx swr.xx -xx.myhuaweicloud.com.
      NOTE:

      xx.xx.xx.xx and swr.xx -xx.myhuaweicloud.com indicate the IP address and domain name obtained in 4, respectively.

    3. Run the following command to restart the network.
    sudo/etc/init.d/networking restart
    • Customizing DNS Hosts:
    1. Obtain the IP address of the VPC endpoint by referring to 4.
    2. Configure DNS forwarding rules on the DNS server in the local data center.

      The method of configuring DNS forwarding rules varies depending onOSs. For details, see the operation guide of the corresponding DNS software.

      This step uses the Linux OS and Bind (common DNS software) as an example.

      1. Edit the /etc/named.conf file to add a zone.
        zone " swr.xx-xx.myhuaweicloud.com " IN {
          type master;
          file " /var/named/swr.xx-xx.myhuaweicloud.com.zone"; 
        };
        NOTE:

        swr.xx-xx.myhuaweicloud.com indicates the private network domain name obtained in Step 4.

      2. Configure forward DNS resolution. Create the /var/named/swr.xx-xx.myhuaweicloud.com.zone file corresponding to the file in a.
        $TTL     604800
        @ IN      SOA       swr.xx-xx.myhuaweicloud.com. root.localhost. (
                                   2         ; Serial
                              604800         ; Refresh
                               86400         ; Retry
                             2419200         ; Expire
                              604800 )       ; Negative Cache TTL
        ;
        @    IN   NS   swr.xx-xx.myhuaweicloud.com.
        swr.xx-xx.myhuaweicloud.com.    IN   A     xx.xx.xx.xx
      3. Restart the service.

        /sbin/service named restart

      NOTE:
      • If no DNS server is available in the local data center, add the endpoint IP address for accessing DNS to the /etc/resolv.conf file of the local data center.
      • swr.xx-xx.myhuaweicloud.com indicates the IP address obtained in Step 4.

  6. Run the following command to verify the configuration and check the output.

    ping swr.xx -xx.myhuaweicloud.com

  7. Use this domain name (swr.xx -xx.myhuaweicloud.com) in the later access to SWR.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback