Milesight VPN is based on OpenVPN, it support connecting your PC to the VPN server by OpenVPN client. If connecting failed, please refer to this article for simple troubleshots.
You can select either OpenVPN Connect or Community OpenVPN as OpenVPN client. In this article, we will take Community OpenVPN as example. You can see log at the main interface once you click ‘Connect’.
You can find similar log record on OpenVPN Connect at below interface.
Symptom 1: Connection Timed Out
1. Check if the Milesight VPN server is reachable for your PC.
You can use the Command Prompt tool on Windows to check the connectivity between your server and your PC.
If you find you can’t ping through Milesight VPN server, but your PC and server can access Internet, please double check the firewall setting on your PC, router, server or VM.
Take Windows10 PC as an example, you can disable Windows10 firewall at Notification Center->All settings->Updates & Security->Windows Security->Firewall & network protection.
2. Check if your Milesight VPN ‘Listen IP’is correct.
The ‘Listen IP’ parameter should be the same IP or domain of server that listening the VPN connection. You can check this parameter at Milesight VPN web interface, or .ovpn file that you download from server.
Symptom 2: Unknown Error
1. Check if Milesight VPN core is running.
You can check Milesight VPN running progress by command:
ps -ef | grep vpn
If your result is lack of ‘openvpn’, it means VPN service was killed by accident or Milesight VPN didn’t initialization successful. you can try below command to restart Mileishgt VPN on your server:
2. Check if your server missing ‘net-tools’.
If you still can’t see ‘openvpn’ progress after rerun the Milesight VPN, you can use command: ifconfig to check if your server lack of ‘net-tools’ component.
If so, you should install ‘net-tools’ in your server, and restart Milesight VPN by command:
sudo apt install net-tools -y
3. Check if your server have multiple version of MySQL.
If you still can’t see ‘openvpn’ progress, you can check MySQL version by command:
dpkg -l | grep mysql
It mostly happens when you upgrade your Ubuntu system and didn’t remove the lower version of MySQL. You should completely remove MySQL and reinstall Milesight VPN in this case. You can use below command to completely remove MySQL and Milesight VPN:
sudo rm /etc/init.d/milesight_vpn.sh /etc/init.d/urvpn-server /etc/init.d/urvpn_watchdog_start.sh
sudo rm -rf /milesight_vpn
sudo dpkg -P milesight-vpn
sudo apt purge mysql*
Symptom 3: TLS Error After Verify OK
1. Check if your PC time and server system time match.
You can use command: date to check the server system time, if this time different from your PC time more than one day, please check if time on your PC or server is wrong.
You can use below command enable NTP on your server:
timedatectl set-ntp true
systemctl restart systemd-timesyncd.service
Or use command: date -s mm/dd/yyyy to calibrate the time manually.
3. Check if Milesight VPN certificates is outdated.
You can check expire date of your root certificate by command:
sudo openssl x509 -noout -text -in /milesight_vpn/urvpn/root_ca/root.crt
The default valid time of Milesight VPN is one year, if your certificates is outdated, please refer to this article to generate new certificates.
Symptom 4: Verify Error
1. Check if you reinstalled Milesight VPN and still use previous Openvpn config file.
2. Check if your PC date is before or after the certificate valid time.
You can check Milesight VPN running log at path: /milesight_vpn/logs/forever.log and Milesight VPN server log at path: /milesight_vpn/urvpn/openvpn/openvpn_server.log
1. If you encounter ‘Interrupted system call’at openvpn_server.log, it means openvpn progress was killed by accident.
2. If you encounter ‘Linux ifconfig failed’at openvpn_server.log, it means this server doesn’t installed net-tools.
3. If you encounter ‘VERIFY ERROR’at openvpn_server.log, it means there are error at system time or certificates is outdated.
4. If you encounter ‘DATABASE INITIAL FAILED’at forever.log, it means Milesight VPN can’t access the MySQL database. It mostly happens when you upgrade your Ubuntu system and didn’t remove the lower version of MySQL or you have changed the structure of MySQL.