If you encounter issues when using SSL-VPN connections, check the logs of SSL-VPN clients or the SSL-VPN connection logs in the VPN Gateway console to troubleshoot the issues.
Background
This topic describes common SSL-VPN connection issues and troubleshooting steps. Check the logs of SSL-VPN clients or the SSL-VPN connection logs in the VPN Gateway console. See the Summary table section.
For information about querying SSL-VPN client logs on Linux, Windows, macOS, or Android, see the Log file locations for SSL-VPN clients section of this topic.
For information about querying SSL-VPN connection logs, see Query the logs of an SSL server.
Log file locations for SSL-VPN clients
The default log file location depends on the client operating system. The following table lists the default log file directories for each supported operating system.
If you specified a custom directory when installing the VPN application, the log file is in that directory instead.
Operating system | Default log file directory |
Linux client with OpenVPN installed | /var/log/openvpn.log |
Windows client with OpenVPN installed | By default, the log file is stored in the log folder of the directory in which OpenVPN is installed. Example: C:\Users\User\OpenVPN\log. |
macOS client with Tunnelblick installed | /Library/Application Support/Tunnelblick/Logs |
macOS client with OpenVPN installed | /Library/Application Support/OpenVPN/log/connection_name.log |
Common SSL-VPN connection issues and troubleshooting
After you obtain the SSL-VPN connection logs, search for relevant keywords to identify the issue. The following table lists common issues, keywords, and troubleshooting steps.
Category | Cause | Keyword | Solution |
Network connection failure | Network communication is abnormal. |
|
|
Protocol or port number mismatch | The client and SSL server use different protocols or ports. |
| Change the Protocol and Port on the SSL server, then download and install a new SSL client certificate on the client. |
Excessive connections | The number of SSL-VPN connections exceeds the limit. |
|
|
Certificate expiration | The SSL client certificate has expired. |
|
|
Certificate configuration error | The certificate configuration is invalid. |
| Delete the current SSL client certificate and all its configurations, then download and install a new certificate on the client. |
Incompatible VPN application versions | The version of the VPN application installed on the client is incompatible with the Alibaba Cloud SSL server. |
| Uninstall the existing VPN application from the client and install a version compatible with the SSL server. For more information, see the "Step 4: Configure the client" section of the Connect a client to a VPC topic. |
Insufficient IP addresses | The client CIDR block on the SSL server does not have enough IP addresses. |
| Make sure that the number of IP addresses in the client CIDR block is at least four times the maximum number of SSL-VPN connections supported by the VPN gateway. For more information, see Create and manage an SSL server. For example, if you specify 192.168.0.0/24 as the client CIDR block, the system first divides a subnet CIDR block with a subnet mask of 30 from 192.168.0.0/24, such as 192.168.0.4/30. This subnet provides up to four IP addresses. Then, the system allocates an IP address from 192.168.0.4/30 to the client and uses the other three IP addresses to ensure network communication. In this case, one client consumes four IP addresses. Therefore, to ensure that an IP address can be allocated to your client, you must make sure that the number of IP addresses in the client CIDR block is at least four times the maximum number of SSL-VPN connections supported by the associated VPN gateway. |
Encryption algorithm mismatch | The SSL server and client use different TLS cipher suites and no matching encryption algorithm can be found. |
| Install the VPN application recommended by VPN Gateway on your client. For more information, see the "Step 4: Configure the client" section of the Connect a client to a VPC topic. |
Inconsistent encryption algorithms | The configurations of encryption algorithms in the SSL server and client are inconsistent. |
| Check whether the encryption algorithm of the SSL client certificate installed on the client is consistent with that of the SSL server. If the encryption algorithms are inconsistent, delete the current SSL client certificate and all configurations, redownload the certificate, and then install the certificate on the client.
|
Packet ID conflict | The network connection is unstable or the encryption algorithm of the SSL server is set to none. |
|
|
Time synchronization issue | SSL verification fails or the time difference between the client and SSL server exceeds 10 minutes. |
|
|
Certificate verification failure | The SSL certificate verification fails. |
|
|
Two-factor authentication failure | The two-factor authentication fails. |
|
|
Missing TAP adapter | The client does not have a TAP virtual Ethernet adapter. |
|
|
Stopped ovpnagent program | The ovpnagent program on a macOS client is not running. |
|
|
Frequent client reconnection | The client automatically reconnects to the server. |
|
|
Network ACL configuration issues | The network ACL bound to the VPC vSwitch does not allow inbound traffic from the VPN client CIDR block | The SSL-VPN connection is established successfully, but resources in the VPC cannot be accessed. |
|
Check security group rules
Make sure that the security group rule of the ECS instance allows access from the client.
Security group rules have priorities. If a security group contains two rules that have the same priority but different actions (allow and deny), the deny rule takes precedence. Example:
Symptom: Unable to ping resources in the VPC after the SSL-VPN connection is established.
Cause: The security group contains two inbound ICMP rules, both with priority 1:
Deny all sources (0.0.0.0/0)
Allow the VPN client CIDR block (10.200.200.0/24)
When the two rules have the same priority, the deny rule takes precedence, causing ICMP traffic to be blocked.
Solution: Increase the priority value of the deny rule (for example, change it from 1 to 2) so that the allow rule (priority 1) is matched and takes effect first.
Check the operating system firewall of the ECS instance
If the SSL-VPN connection is established successfully but you cannot ping the ECS instance or access services on the ECS instance, log on to the ECS instance to check whether the operating system firewall blocks traffic from the VPN client.
Run the following command to check the status of the firewalld service.
systemctl status firewalldIf firewalld is in the
active (running)state, the firewall is running. Runsudo systemctl stop firewalldto temporarily disable the firewall and then test the connectivity again. If traffic is restored after the firewall is disabled, the firewalld rules block the VPN traffic. Configure a rule to allow the VPN client CIDR block.Run the following command to view the iptables rules.
iptables -LCheck whether the output contains a DROP or REJECT rule that blocks traffic from the VPN client CIDR block. If such a rule exists, run
sudo iptables -I INPUT -s <VPN client CIDR block> -j ACCEPTto add an allow rule.Run the following command to check the SELinux status.
getenforceIf
Enforcingis returned, SELinux is in enforcing mode. Runsudo setenforce 0to temporarily switch to Permissive mode and then test again. If traffic is restored, the SELinux policy affects VPN communication. Adjust the SELinux policy to allow VPN traffic.
References
The following references may help you troubleshoot SSL-VPN connection issues.
To modify the configuration of the SSL server, see Modify an SSL server.
To modify the connection specification of the SSL server, see Modify SSL concurrent connections.
To create an SSL client certificate, see Create and manage SSL client certificates.
To download an SSL client certificate, see Download an SSL client certificate.
"Step 4: Configure the client" section in the Connect a client to a VPC topic
To view the log information of the SSL server, see View the logs of the SSL server.
To view client connection information, see View SSL client connections.
To modify client configurations when troubleshooting SSL-VPN connection issues, refer to your client's user guide.