Security

How to get a secure connection on iOS and macOS by using OpenVPN

With OpenVPN, you can quickly connect to secure services. Learn how to set up the OpenVPN client on iOS 10 and macOS 10.12.

openvpnhero.jpg
Cory Bohon / TechRepublic

When you're traveling or just accessing the internet on a shared connection, it's important to ensure you have a secure connection. OpenVPN, a popular solution for Virtual Private Networking (VPN), lets you connect to secure services. It provides a secure connection back to the server, ensuring that traffic remains secure as it traverses the internet.

OpenVPN is available as a self-hosted solution through multiple providers, and even on some home and business routers. OpenVPN clients are available on the majority of platforms.

In this tutorial about OpenVPN, I'll show you how to set up the iOS client and a macOS client to secure your network traffic. I assume you already have an OpenVPN server that uses .ovpn files and certificates to connect, or a subscription to one.

SEE: How to quickly deploy an OpenVPN server (TechRepublic)

iOS OpenVPN connections

OpenVPN uses a process that's different than other VPN settings, and it can be configured directly inside of the iOS Settings app. Because OpenVPN uses a few files to handle the connection, those files must first be imported into the app. This method works on iOS 6.0 and later.

If you have an OpenVPN service that gives you the certificate and OpenVPN connection files, follow these steps to configure the service.

  1. Connect your iOS device to your Mac or PC via the USB Lightning cable.
  2. Open iTunes and then select your device from within the iTunes interface.
  3. Select the Apps tab, and then locate the File Sharing section.
  4. Click OpenVPN, and then drag and drop the certificate and OpenVPN connection files into the OpenVPN Documents section (Figure A).
  5. Select Done, and then select Sync to copy the files to your iOS device.

Figure A

openvpn1.jpg

The easiest way to import the OpenVPN connection files is to drag and drop the unzipped files into the iTunes File Sharing section of the OpenVPN app.

Cory Bohon / TechRepublic

Once the files are imported, it's super easy to finish the setup. Open the OpenVPN app, and select the green + button next to the imported files. Now you can connect to the configured OpenVPN server.

Using the OpenVPN app to connect in newer versions of iOS also means that you can toggle the VPN connection inside of the Settings app. When you have a secured connection, the VPN icon will appear in the status bar of your iOS device next to the Wi-Fi status indicator and the time (Figure B).

Figure B

openvpn2.jpg

Enabling the switch labeled VPN in the Settings app is the quickest way to start a new connection with the OpenVPN server. It will remain connected as long as you have an active internet connection on the iOS device.

Cory Bohon / TechRepublic

macOS OpenVPN connections

macOS doesn't include a built-in way to connect to OpenVPN like standard credential-based VPN settings work. For this reason, you'll need an OpenVPN client, and one of the best that I've found on macOS is Viscocity ($9 USD, a free trial is available). Viscocity is compatible with macOS version 10.7 and later.

To set up this app with your OpenVPN connection settings, follow these steps.

  1. Select the Connections tab.
  2. Select the + at the bottom, and then Import Connection | From File.
  3. Select your OpenVPN (.ovpn) file, and then select Open (Figure C).

Figure C

openvpn3.jpg

Once imported, the connection will appear in this list.

Cory Bohon / TechRepublic

When you do this, and if your certificate is in the same directory as the OpenVPN instruction file, then they will be imported as well. You can verify this by double-clicking the connection that was just imported, and selecting the Authentication tab (Figure D).

Figure D

openvpn4.jpg

You can view the current certificates that are selected in the Authentication tab, or change the certificate.

Cory Bohon / TechRepublic

Also see

About Cory Bohon

Cory Bohon is an indie developer specializing in iOS and OS X development. He runs a software company called Cocoa App and is also a developer at MartianCraft. He was introduced to technology at an early age and has been writing about his favorite te...

Editor's Picks

Free Newsletters, In your Inbox