How Do I Enable the Internet on Other Cloud Service Pages?
Scenario
After you purchase a cloud desktop, the cloud desktop is in the VPC subnet by default and cannot access the Internet. You need to configure the NAT gateway to share an EIP so that the cloud desktop can access the Internet. You can use the quick entry on Workspace to enable the Internet, or access the NAT and EIP consoles to purchase services.
This section describes how to purchase NAT and EIP services so that the cloud desktop can access the Internet. You can use the quick entry on Workspace to purchase NAT and EIP services to enable the Internet. For details, see Configuring Workspace to Access the Internet.
Prerequisites
- You have obtained the region, project, VPC, and subnet information of the desktop that needs to access the Internet.
- You have the permission for performing operations on the NAT and EIP services.
- By default, a self-registered Huawei account has the operation permissions of all services on Huawei Cloud.
- To use NAT and EIP, the IAM account created under the Huawei account must be added to the admin user group or a user group with NAT and EIP operation permissions. You can go to the IAM page to check whether the user belongs to the admin user group. If the user group is not an admin user group, grant the IAM account the permission to use the NAT and EIP services. For details, see Creating a User and Granting NAT Gateway Permissions and Creating a User and Granting EIP Permissions.
Procedure (Not Interconnecting to Windows AD)
Creating an EIP
- Log in to the console as the administrator.
- Click in the upper left corner and select the region and project where the desktop to access the public network is located.
- Click and choose Networking > Elastic IP in the service list.
- On the page displayed, click Buy EIP.
- Set the parameters by referring to the parameter description in section Assigning an EIP.
Select the region and project of the desktop that you want to access the public network.
- Click Next.
- Confirm the configurations and click Submit.
Buying a public NAT gateway
- Click and choose Networking > NAT Gateway in the service list.
- Click Buy Public NAT Gateway.
- Set the parameters by referring to the parameter description in section Buy a Public NAT Gateway.
Select the VPC and subnet to which the desktop that needs to access the Internet belongs.
- Click Next.
- Confirm the configurations and click Submit.
- On the page for adding a rule, click Cancel.
Checking whether the VPC has a route to the NAT gateway
- Click and choose Business Applications > Workspace in the service list.
- Click Tenant Configuration.
- Click the VPC name of the tenant to go to its basic information page.
- In the Networking Components area on the right of the page, click the number next to Route Tables to go to the route table list page of the VPC.
- Click the name of the target route table. The basic information list is displayed.
- Check whether there is a route whose next hop is the NAT gateway in the route list.
The NAT gateway automatically creates a route 0.0.0.0/0 from the VPC to the NAT gateway to allow traffic from the VPC to the NAT gateway, as shown in Figure 1.
Adding an SNAT rule
- Click and choose Networking > NAT Gateway in the service list.
- On the displayed page, locate the NAT gateway created in 12 and click Configure Rules in the Operation column.
- On the SNAT Rules tab page, click Add SNAT Rule.
- Set the parameters based on the parameter description in section Add an SNAT Rule.
Set Scenario to VPC, Subnet to Existing, and EIP to the EIP purchased in 7.
- Click OK.
If the added SNAT rule is in the Running state, the rule is added successfully.
Verifying whether the desktop can access the public network through the NAT gateway
- Use the user account and password to log in to the desktop through the client to check whether the desktop can access the external network.
Procedure (Interconnecting to Windows AD)
Creating an EIP
- Log in to the console as the administrator.
- Click in the upper left corner and select the region and project where the desktop to access the public network is located.
- Click and choose Networking > Elastic IP in the service list.
- On the page displayed, click Buy EIP.
- Set the parameters by referring to the parameter description in section Assigning an EIP.
Select the region and project of the desktop that you want to access the public network.
- Click Next.
- Confirm the configurations and click Submit.
Buying a public NAT gateway
- Click and choose Networking > NAT Gateway in the service list.
- Click Buy Public NAT Gateway. The Buy Public NAT Gateway page is displayed.
- Set the parameters by referring to the parameter description in section Buy a Public NAT Gateway.
Select the VPC and subnet to which the desktop that needs to access the Internet belongs.
- Click Next.
- Confirm the configurations and click Submit.
- On the page for adding a rule, click Cancel.
Checking whether the VPC has a route to the NAT gateway
- Click and choose Business Applications > Workspace in the service list.
- Click Tenant Configuration.
- Click the VPC name of the tenant to go to its basic information page.
- In the Networking Components area on the right of the page, click the number next to Route Tables to go to the route table list page of the VPC.
- Click the name of the target route table. The basic information list is displayed.
- Check whether there is a route whose next hop is the NAT gateway in the route list.
The NAT gateway automatically creates a route 0.0.0.0/0 from the VPC to the NAT gateway to allow traffic from the VPC to the NAT gateway, as shown in Figure 1.
Figure 2 Route to the NAT gateway
Adding an SNAT rule
- Click and choose Networking > NAT Gateway in the service list.
- On the displayed page, locate the NAT gateway created in 12 and click Configure Rules in the Operation column.
- On the SNAT Rules tab page, click Add SNAT Rule.
- Set the parameters based on the parameter description in section Add an SNAT Rule.
Set Scenario to VPC, Subnet to Existing, and EIP to the EIP purchased in 7.
- Click OK.
If the added SNAT rule is in the Running state, the rule is added successfully.
Configuring DNS forwarding
- Log in to the DNS server as the administrator.
- On the taskbar in the lower left corner, click .
- Click on the right of the Start menu.
- The Server Manager window is displayed.
- In the navigation pane on the left, click DNS.
- In the SERVERS area, right-click a Server name and choose DNS Manager from the shortcut menu.
- The DNS Manager dialog box is displayed.
- Expand DNS. Right-click the computer name, and choose Properties from the shortcut menu.
- On the Advanced tab page, deselect Disable recursion (also disable forwarders) and click Apply.
- On the Forwarder tab page, click Edit, enter the default DNS server IP address of the desktop region in the text box, and click OK.
The default DNS server IP address of the desktop region can be obtained from the private DNS server addresses provided by Huawei Cloud.
Verifying whether the desktop can access the public network through the NAT gateway
- Use the user account and password to log in to the desktop through the client to check whether the desktop can access the external network.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot