//

General OpenVPN setup info

Getting a third party VPN can be complicated, the very best way to do it requires using the command line because you get verbose messages and error logs, if you are comfortable using the command line, its just a few steps. In this tutorial we will use the VPN provider PIA, or “Private Internet Access” as the example.

First, get ssh access to the device. You can do this by adding a dropbear instance on the device under 'system' –> administration from within the admin interface. Then click save and apply, and log into the device using the password you set as as the general admin password and username root. The default port is 22.

For more information on using SSH, see: https://www.anonabox.com/wiki/doku.php?id=getting_ssh_access

In order to get access to ssh on the device, you will need to turn Tor off, if you have Tor running, it will redirect your ssh traffic back out over the Tor network instead of the local interface on the device.

If you are on a windows machine, you can use a free ssh client program called putty downloadable here: http://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

In MacOS, you can just use the built in terminal application. To open the Terminal app, click Go in the top menu, then select Utilities, then click Terminal.app. The command for MacOS is ssh root@192.168.19.84

Once you are connected by ssh, you will need to get your .ovpn config file from the VPN provider on to the device. If you open the .ovpn config file in a text editor and copy all that text, then in the terminal with the ssh connection going type: cd /etc/openvpn them type vim pia.ovpn It will open up a new file, press any key to switch to 'edit' mode, then you should be able to paste the contents of the text from the ovpn file into it. After that, hit the esc button once, then type :wq!

Which will write the changes to the file.

After that, just type openvpn ./pia.ovpn

And it will initiate the connection based on the parameters specified in that config file. If there is a problem, you will get an error message stating what happened. Its pretty verbose so it should tell you exactly whats going on. If there is an error, send us the message and we will have a look for you.

If all goes well, it will run the config file and you will be connected , and that's it!

Once you verify that it is working, there are a few other things we can do to help you make it convenient in terms of disconnecting/connecting without having to use the command line. To do so, see this documentation: https://www.anonabox.com/wiki/doku.php?id=building_custom_commands_for_third_party_vpns

Another way to transfer the ovpn file onto your anonabox so you can use it is to use the wget command. You will need to be able to pull the ovpn config file from a url online, most likely from the VPN providers website. The command works like so: wget https://websiteurl.com/location/of/openvpnconfig.ovpn

That command will download the file to the anonabox in the current working directory.

If you are unable to pull the ovpn config file from a URL, perhaps because your vpn provider requires a login or there is some other sort of authentication required, you can download the ovpn config file to your local computer, and then use a free program like winscp to transfer it to the anonabox. Winscp works like an ftp client but uses the scp protocol, which transfers the files over ssh.

In order for winscp to connect, you will need to input your login credentials just like you would do on the command line, the username is root and the password is whatever you set the admin password to in the interface. You will also need to enable a dropbear instance.

Once you have winscp connected to the anonabox, you will see the files on your computer and the files on the anonabox and be able to drag and drop between the two.

More Detailed Documentation

More detailed information about OpenVPN implementation can be found on the official OpenWrt wiki documentation here: https://wiki.openwrt.org/doc/howto/vpn.client.openvpn.tun

For another example of Third Party VPN configuration on an Anonabox, go here: https://www.anonabox.com/wiki/doku.php?id=purevpn