AWS and Huawei Cloud establish Site to Site VPN

Huawei Cloud Site Create VPN

VPN Gateway

Create S2C VPN Gateway

7. AWS and Huawei Cloud establish Site to Site VPN - 图1

7. AWS and Huawei Cloud establish Site to Site VPN - 图2

7. AWS and Huawei Cloud establish Site to Site VPN - 图3

7. AWS and Huawei Cloud establish Site to Site VPN - 图4

7. AWS and Huawei Cloud establish Site to Site VPN - 图5

Customer Gateway

7. AWS and Huawei Cloud establish Site to Site VPN - 图6

7. AWS and Huawei Cloud establish Site to Site VPN - 图7

7. AWS and Huawei Cloud establish Site to Site VPN - 图8

VPN Connections

7. AWS and Huawei Cloud establish Site to Site VPN - 图9

AWS Site Create VPN

7. AWS and Huawei Cloud establish Site to Site VPN - 图10

这里的 PSK 和 Confirm PSK 与 AWS 侧填写保持一致即可。

7. AWS and Huawei Cloud establish Site to Site VPN - 图11

7. AWS and Huawei Cloud establish Site to Site VPN - 图12

7. AWS and Huawei Cloud establish Site to Site VPN - 图13

Customer Gateway

7. AWS and Huawei Cloud establish Site to Site VPN - 图14

  • IP address 选择配置为华为云侧对外的公网 IP 地址,为 VPN Gateway 的 Gateway IP Address 列所展示的地址信息,如果你选择了主备或者 Active - Active 模式,那么就选择 EIP 1 的地址即可。

7. AWS and Huawei Cloud establish Site to Site VPN - 图15

7. AWS and Huawei Cloud establish Site to Site VPN - 图16

Virtual private gateways

7. AWS and Huawei Cloud establish Site to Site VPN - 图17

7. AWS and Huawei Cloud establish Site to Site VPN - 图18

7. AWS and Huawei Cloud establish Site to Site VPN - 图19

7. AWS and Huawei Cloud establish Site to Site VPN - 图20

Site-to-Site VPN Connections

7. AWS and Huawei Cloud establish Site to Site VPN - 图21

7. AWS and Huawei Cloud establish Site to Site VPN - 图22

7. AWS and Huawei Cloud establish Site to Site VPN - 图23

7. AWS and Huawei Cloud establish Site to Site VPN - 图24

7. AWS and Huawei Cloud establish Site to Site VPN - 图25

7. AWS and Huawei Cloud establish Site to Site VPN - 图26

7. AWS and Huawei Cloud establish Site to Site VPN - 图27

  • 获取默认的 PSK 认证码

7. AWS and Huawei Cloud establish Site to Site VPN - 图28

选择 VPN Tunnel 地址,然后复制 Pre-shared key 选项的值,然后使用这个值填写到华为云侧的连接 PSK 框中,这里你也可以进行自定义修改,只要保证两边一致即可。

7. AWS and Huawei Cloud establish Site to Site VPN - 图29

7. AWS and Huawei Cloud establish Site to Site VPN - 图30

Adding routes on the VPC

7. AWS and Huawei Cloud establish Site to Site VPN - 图31

7. AWS and Huawei Cloud establish Site to Site VPN - 图32

Add a static route to the target Huawei Cloud VPC network. Select Virtual Private Gateway for Target and the created VGW resource for Resource.

7. AWS and Huawei Cloud establish Site to Site VPN - 图33

7. AWS and Huawei Cloud establish Site to Site VPN - 图34

AWS ec2 accesses Huawei Cloud object storage through the intranet

Huawei Cloud VPN adds object storage (100.125.0.0/16) network

7. AWS and Huawei Cloud establish Site to Site VPN - 图35

7. AWS and Huawei Cloud establish Site to Site VPN - 图36

7. AWS and Huawei Cloud establish Site to Site VPN - 图37

Add VPC Endpoint Service (DNS & OBS) on Huawei Cloud

7. AWS and Huawei Cloud establish Site to Site VPN - 图38

Modify the local and remote IPv4 network CIDR addresses on AWS

Change the addresses allowed through VPN on both ends to 0.0.0.0/0

7. AWS and Huawei Cloud establish Site to Site VPN - 图39

7. AWS and Huawei Cloud establish Site to Site VPN - 图40

7. AWS and Huawei Cloud establish Site to Site VPN - 图41

VPN Connections adds routes to the 100.125.0.0/16 network segment

7. AWS and Huawei Cloud establish Site to Site VPN - 图42

Add a route to the 100.125.0.0/16 network segment in the VPC routing table

The next hop address is selected as the VGW device of the VPN VPG

7. AWS and Huawei Cloud establish Site to Site VPN - 图43

7. AWS and Huawei Cloud establish Site to Site VPN - 图44

Configure Sync Proxy EC2 to access DNS and OBS

Modify the DNS configuration of Sync Proxy EC2

Log in to Sync Proxy EC2 by default.

Execute Command:

  1. echo -e "\n[Resolve]\nDNS=10.10.0.23\nDomains=~myhuaweicloud.com" >> /etc/systemd/resolved.conf && systemctl restart systemd-resolved
  2. cat /etc/systemd/resolved.conf

Modify the daemon.json file of docker service and add DNS configuration.

Sync Proxy is installed by default.

  1. {
  2. "default-ulimits": {
  3. "nofile": {
  4. "Name": "nofile",
  5. "Hard": 1048576,
  6. "Soft": 1048576
  7. }
  8. },
  9. "dns": ["127.0.0.53"]
  10. }

Restart the Docker service.

  1. sudo systemctl retsart docker