Whitelist Cloud Assistant server IPs in OpenVPN
After you configure OpenVPN on a Windows instance, Cloud Assistant will not work correctly. To resolve this, add the Cloud Assistant server IP address to a whitelist in your OpenVPN configuration.
OpenVPN parameters
To route traffic for only specific IP addresses through the OpenVPN tunnel, use the following parameters in the OpenVPN client configuration file:
-
route-nopullWhen added to the
client.ovpnconfiguration file, this parameter prevents the OpenVPN client from pulling routes from the server. As a result, no traffic is routed through the OpenVPN tunnel by default. -
vpn_gatewayAfter adding the
route-nopullparameter to theclient.ovpnconfiguration file, use thevpn_gatewayparameter to specify which network traffic to route through the OpenVPN tunnel. -
net_gatewayWhen included in the
client.ovpnconfiguration file, this parameter routes all network traffic through the OpenVPN tunnel by default. Use thenet_gatewayparameter to let traffic for specific IP addresses bypass the OpenVPN tunnel.
Procedure
-
Connect to the instance.
For more information, see Log on to a Windows instance by using Workbench.
-
Obtain the IP address of the Cloud Assistant server.
To get the IP address, resolve the Cloud Assistant service endpoint. The endpoint is in the format
<region-id>.axt.aliyun.com.NoteReplace <region-id> with the region ID of your instance. For more information about Alibaba Cloud regions, see Regions and availability zones.
For example, to get the Cloud Assistant server IP address in the China (Zhangjiakou) region, run the following command.
ping cn-zhangjiakou.axt.aliyun.comC:\Users\Administrator>ping cn-zhangjiakou.axt.aliyun.com Pinging cn-zhangjiakou.axt.aliyun.com [100.xxx.xxx.xxx] with 32 bytes of data: Reply from 100.xxx.xxx.xxx: bytes=32 time<1ms TTL=102 Reply from 100.xxx.xxx.xxx: bytes=32 time<1ms TTL=102 Reply from 100.xxx.xxx.xxx: bytes=32 time<1ms TTL=102 Reply from 100.xxx.xxx.xxx: bytes=32 time<1ms TTL=102 Ping statistics for 100.xxx.xxx.xxx: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0msThe
100.XX.XX.XXvalue in the command output is the IP address of the Cloud Assistant server. -
Modify the OpenVPN client configuration file
client.ovpn.For example, modify the configuration file at
C:\Program Files\OpenVPN\config\client.ovpn. The actual path depends on your OpenVPN installation directory. -
Restart the OpenVPN client and reconnect to the VPN.
After you reconnect to the VPN, Cloud Assistant works correctly.