Troubleshooting Connection Problems
Knowledge Base > Troubleshooting > Troubleshooting Connection Problems
Connection problems usually fall into three categories as listed below. Depending on the category there are a number of steps you can take to first diagnose the problem and come up with a solution.
- Unable to connect the VPN connection at all
- The VPN connection successfully connects but drops out after a few minutes
- The VPN connection successfully connects but you're unable to use network services through it
The sections below outline how to solve most problems for each of the above categories. If you're still stuck it's recommended that you get in touch with your VPN provider. If you're unsure who this is please see the How Do I Find Out Who My VPN Provider Is? article.
Unable To Connect The VPN Connection
If Viscosity's icon spins forever, or you receive an error message indicating a connection could not be established, it usually indicates that Viscosity is unable to start the connection or connect to the VPN server.
To resolve this you should first check the OpenVPN log. The OpenVPN log will contain detailed information regarding your connection, and it will usually indicate why you are unable to connect. See the Viewing the OpenVPN Log article for more information.
There are several common error messages you may encounter in the OpenVPN log. Solutions to these can be found in the Common OpenVPN Errors Category.
If the OpenVPN log is blank, or doesn't contain any helpful information, you may have to turn to the Console Log to investigate further. See the Viewing the Console Log article for further information.
The VPN Connection Drops Out
In some instances you may be able to successfully connect your VPN connection, however it drops out after a few minutes. By far the most common cause of this is another computer trying to connect using the same account at the same time. Make sure you haven't left the VPN connection running on another computer before attempting to connect.
Otherwise dropouts are often related to incorrect settings on either the server or in Viscosity. One common cause is misconfigured ping/ping-restart values, which controls how Viscosity/OpenVPN detects an active VPN link for UDP based connections. These values can be modified like so:
- Open Viscosity's Preferences window
- Select your VPN connection and click the Edit button
- Click on the Options tab
- Edit the "Ping" and "Ping-restart" fields. For example, try setting a Ping value of 10, and a Ping-restart value of 3600.
- Click the Save button
- Try reconnecting your VPN connection.
Finally, if you are on a network using a DHCP server (which is usually the case) you should ensure you are using Viscosity's normal DNS support. You can check this like so:
- Open Viscosity's Preferences window
- Click on the Advanced toolbar icon
- Make sure the "Use alternate DNS support" option is un-ticked
- Close the Preferences window
Unable To Use The VPN Connection
As above, you should check the OpenVPN log as your first step. The OpenVPN log will contain detailed information regarding your connection, and may contain warning or error messages. See the Viewing the OpenVPN Log article for more information.
Check the Common OpenVPN Errors Category for solutions to any error messages or warnings you may find.
If no helpful information can be found in the OpenVPN or Console logs, you may have to turn to Mac OS X's inbuilt utilities to determine the cause of the problem.
The Network Utility application, located in /Applications/Utilities/, is a handy tool for diagnosing problems. Most connectivity issues are either a DNS problem or a routing problem, both of which the Network Utility application can be used to diagnose.
Checking For A DNS Problem
You can check to see whether a DNS problem is present like so:
- Open the Network Utility application. This can be found at /Applications/Utilities/Network Utility.app

- Click on the "Ping" tab
- Try pinging a server that you know you should be able to access through the VPN by it's IP address. For example, if you know you should be able to access the SparkLabs website through your VPN connection, try entering "173.45.229.36" (without quotes) as the address to ping, and click the "Ping" button.

- If you get replies (e.g. "64 bytes from 173.45.229.36") it means you can successfully contact the server. If however you don't get any replies (e.g. "0 packets received"), it's likely you have a routing issue (see below), rather than a DNS problem.
- If you successfully get replies, try pinging a server using it's DNS name, for example "www.sparklabs.com.au". If you get a "cannot resolve" error, it means you have a DNS problem.
If you have a DNS problem you should first ensure you are setting a DNS server in Viscosity. This must be a valid DNS server, and must be able to be reached over the VPN connection (you can try pinging its IP address to confirm this). See the Configuring DNS and WINS settings article for more information.
You should also the "Checking Which DNS Servers Are Being Used" section in the Configuring DNS and WINS settings article to make sure Viscosity is correctly setting the DNS server/s on your computer. In some rare instances it may not be able to. In these instances you can try turning on Viscosity's Alternate DNS support like so:
- Open Viscosity's Preferences window
- Click on the Advanced toolbar icon
- Tick the "Use alternate DNS support" option
- Close the Preferences window
Checking For A Routing Problem
You can check to see whether a routing problem is present using the Network Utility application like so:
- Open the Network Utility application. This can be found at /Applications/Utilities/Network Utility.app

- Click on the "Netstat" tab
- Select the "Display routing table information" option, and then click the "Netstat" button.
- Once the routing table is displayed, check to make sure that routes exist (the "Destination") for the traffic you want to go through the VPN connection. If the routes are not present, you can add them under the "Networking" tab in Viscosity when editing your VPN connection.

- You should also check that the routes are using the correct Gateway (typically an internal address for your VPN server), and the correct network interface (Netif). A correct network interface will start with "tap" or "tun". If the routes have been added to the wrong interface, try adding the command "route-delay 20" (without quotes) to the commands area (under the Advanced tab) in Viscosity when editing your connection.
Finally, if you are still having trouble, you should get in touch with your VPN provider for support. If you're unsure who this is please see the How Do I Find Out Who My VPN Provider Is? article.
If you'd like to continue troubleshooting connection problems yourself, please refer to the Support Forum for a wealth of further information, or the OpenVPN Mailing List.
|