Best Way To Learn How To Set Up OpenVPN On Amazon EC2/a VPS?

What is the best way to learn how to set up a VPN using OpenVPN on an Amazon EC2 server/a VPS? What level of proficiency is required in Linux System Administration for this?


Solution 1:

What's the best way to learn how to setup OpenVPN?

Read the How To on the OpenVPN website for an introduction, and while configuring OpenVPN, you'll learn by trial and error. I recommend you testing your firewall rules/ routing settings on your home network first, in case anything go wrong and you loose your SSH connectivity, you can always walk to the physical machine and fix it.

The manual page is very useful for getting known with the configuration directives, and explains how custom scripts are evaluated in which order.

(the next setup was intended for a secured Internet connection on a Debian machine / Ubuntu client. Ubuntu is based on Debian, so it works for an Ubuntu server as well)

I've recentely messed a week with OpenVPN to get it to work, the network setup, addresses, route information and configuration file can be found in How do I configure OpenVPN for accessing the internet with one NIC?. I had only one network interface (eth0), and did not want to use bridging.

I wanted to have IPv6 connectivity through my VPS as well, so I used a tap device (layer 2) instead of a tun device (layer 3). My IPv6 (with scripts) setup can be found at How can I setup OpenVPN with IPv4 and IPv6 using a tap device?.

Ubuntu has a wiki page on setting up OpenVPN for a server+client. I only needed step 1-3 for generating a key, with the custom setup above without using bridges.

What level of proficiency is required in Linux System Administration for this?

Basic knowledge of networking (what layers are, routing) makes you better understand how OpenVPN works. After having set up OpenVPN, you're done. Like any other application, keep your installation up to date (sudo apt-get update && sudo apt-get upgrade) and make sure your keys for using OpenVPN do not get lost.

Solution 2:

The best way to learn is read the official OpenVPN documentation. Really, there is no better resource, and the official documentation is not at all bad.

http://openvpn.net/index.php/open-source/documentation.html

Have a look at the example config files here:

http://openvpn.net/index.php/open-source/documentation/howto.html#examples

If you remove the (very good) comments, you are left with around 10 lines of self-explained configuration instructions. There is no easier way if you want to do it alone, on your own server.

As for the second part of the question. If you are OK with the command line, you have installed one or two other services (like a web server for example), this should be no trouble for you. Besides, apt does most of the job for you.

Bonus:

Here is is a fine guide on how to do it on a linode vps, which is really not at all different than any other ubuntu server installation. http://library.linode.com/networking/openvpn/ubuntu-10.10-maverick