Creating my own VPN on Linode with Algo VPN

For a few years I have been using a commercial VPN service for my personal use. It gave me the capability to tunnel to a slew of countries around the globe, and provides apps on my Mac and my phone.  It balanced my privacy and easy-of-use needs, as most commercial VPN’s do these days.

However, as with most paid services that are easy to use, you give up a certain amount of control or an ability to fine-tune (or just play around). In this case, one aspect I could control is the IP address of the server I’m tunneling through. Another aspect out of my reach is the level at which the commercial VPN hides information about the ones using it. Being naturally curious anyway and with some free time, I undertook figuring out how to setup my own VPN on Linode, where I already host my server for my website and other projects.

After some research I settled on Algo VPN, which seemed to achieve formidable tech community acceptance from both it’s ease of install and robustness. And for connecting VPN clients, there are configuration instructions available for tunneling via Linux, Windows, Mac OS, iOS, and Android. In my case I primarily use Linux, Mac OS and Android, so I was set.

The Linode

I selected creating a Linode Nano, which is their smallest box: a 1024 GB memory instance with 1 CPU and 25 GB of disk…. more than adequate for Algo VPN. At $5/month, it is roughly consistent with the cost of my existing VPN. For this instance it allows 1 TB total transfer each month (in and out), but for my own testing this was fine, as I’m not planning to stream movies though it.

As a note, DO NOT TRY to use any of your existing server instances which is used for other purposes, such as hosting websites. Algo VPN will change core network settings and probably mess up your server.

I installed Ubuntu 18.04 LTS (the current long term support version available at the time of writing) on the instance, and performed all the package updates to bring it current.

VPN Installation

The command line instructions included with Algo VPN were as easy as they had been reviewed by others. It will walk you through a series of questions, and then perform it’s install. I won’t go through the how-to here since other people already have elsewhere, but suffice to say it, in an hour or so, I had it up.

With software that easy to setup, I was eerily skeptical if it would actually work though when I connected.

And…it did!

For my Mac, one of the files that is produced out of the installation is useable directly in Mac OS to configure the VPN. Within a minute I had my tunnel established.

For Android, there is an open client app you can download, and import another configuration file created during Algo installation, within another few minutes my phone was connected.

None of these instructions, as easy as they are, will be EASY for the mass market type of VPN customer. But in terms of what I’ve dealt with in the past, and that I’m well accustomed to manual configuration of most anything, it was a breeze.

Testing

Of course I began by visiting specific sites that will tell you how your VPN is looking from the outside. As I hoped they reported seeing my Linode instance’s IP address correctly, and not my computer’s IP. I ran a DNS leak test as well (e.g. DNSLeakTestDoILeak, Whoer), and the DNS requests going through the tunnel did not give away my true location.

Both services did point out an issue with WebRTC in Chrome giving away my computer’s IP, but that’s a Chrome issue and only via web browsing in that browser, which is something I need to look into. WebRTC cannot be disabled (at least easily) in Chrome from leaking this information.

On Linode, I can see my traffic going through the VPN on the various graphs provided for my instance… something that appeases the engineer in me. Nothing really more to say about it.

A big benefit here is that, as often as I want, I can quickly spin up other Linodes which clone this configuration, all of which have different IP addresses.

I’m still evaluating this little experiment, but at least I can say that Algo VPN is what it’s cracked up to be.

The traveling salesman, Steiner trees, and bubbles

Be forewarned: Of course no solution here, but rather a train of thought I want to jot down…if not for your consideration, then for me to pick up later. Also, this post mentions soap film, not bubbles. But who doesn’t like bubbles? Same generally can’t be said for soap film.

The Traveling Salesmen Problem is a hard problem. In fact, it’s NP-hard. Here’s a description (thanks, Wikipedia!):

The Traveling Salesman Problem describes a salesman who must travel between N cities. The order in which he does so is something he does not care about, as long as he visits each one during his trip, and finishes where he was at first. Each city is connected to other close by cities, or nodes, by airplanes, or by road or railway. Each of those links between the cities has one or more weights (or the cost) attached. The cost describes how “difficult” it is to traverse this edge on the graph, and may be given, for example, by the cost of an airplane ticket or train ticket, or perhaps by the length of the edge, or time required to complete the traversal. The salesman wants to keep both the travel costs, as well as the distance he travels as low as possible.

The salesmen needs to find a single loop to hit every city, and our objective is to find the least cost to make that loop. Let’s assume that cost is the distance: the salesman wants to get home as fast as possible.

OK, put that on ice for a moment and switch gears.

Another problem that also involves graphs is the Steiner Tree Problem, which is a little different. While you can still consider many cities as with the above problem, in this case we’re talking about road planning. How do you connect all the cities with the minimum distance of road pavement? In more general terms, what is the minimum length of edges that include all fixed points in the graph?

I was first introduced to Steiner Trees via this wonderful video by the good folks at Numberphile:

What astounded me is that we can “use nature” by exploiting an inherent property: get to the lowest energy state possible. Whether its water rolling down a hill to find bottom, or lightening finding the optimum path to reach ground, nature generally looks for the easiest path to get to the lowest possible energy state. In this particular scenario, the soap film expends as little energy as possible to maintain itself. The area of the film for a segment varies with the total length between the pegs. Nature wants to minimize its film area, so in doing so it also finds the minimum length solution for us. (The end of the video showed a local minimum, which by adding some energy, yielded the global minimum. Clever!)

The ultimate supercomputer

No calculations, no algorithms, no processing. Intrinsically, nature behaves like an infinitely-scaled parallel processor, evaluating all possible paths simultaneously in an attempt to find the lowest possible energy state that maintains itself. In my mind, this behavior is analogous to quantum computers where all states are evaluated simultaneously (for the purists, greatly simplified).

Via this exercise in the physical world, nature solved a mathematical problem by finding the shortest distance between a set of points. Can nature also similarly identify the shortest loop through a set of points for our friend, the traveling salesman?

Comparing the problems

The Traveling Salesman problem has the following properties (where I equate the edge cost to the distance between cities):

  1. Requirement to create a loop (in contrast to Steiner Trees, which have no such requirement), and therefore a traversal order is implied.
  2. Each city has precisely two edges connected to it (where Steiner Trees have at least one).
  3. All available paths and their associated distances between cities are fixed (whereas the paths between nodes in Steiner Trees are undefined from the start, and the paths with associated distances are solved for).
  4. The number of cities cannot be changed (whereas Steiner Trees can increase the number of nodes by adding Steiner Points if it reduces the total distance).

As I see it, the primary difference is that Steiner Trees solve for the minimum total distance to connect all nodes, versus the Traveling Salesman problem must solve for the minimum loop distance by identifying a traversal order.

Another way to contrast is that Steiner Trees are unordered because a traversal order isn’t part of the solution, and the Traveling Salesmen problem is ordered because you must find the right loop through all nodes.

Naturally…

Is there a natural phenomena, similar to the soap film exercise that would provide a solution to a given Traveling Salesmen problem?

I’ve been pondering this for the past few days, and I think the problem’s complexity lies in the ordering. Unlike Steiner Trees where nature “solves” for minimum distance by finding the lowest energy at an instant, here it would need to solve for the minimum distance over every ordered permutation of nodes. That implies iterations and time dependency, which reminds us of why this is NP-hard.

If we find a natural phenomena where things are traversed in a specific order which happens to be the optimal distance, we have a chance. At the moment, nothing comes to mind.

Being a SXSWedu Mentor

I had the privilege of being a mentor at SXSWedu 2016, and it was a valuable, rewarding experience in which I cannot wait to participate again.

The nuts and bolts

On my SXSWedu mentor profile, I listed a few topics which I could competently talk about:

  • Software development: Web, mobile, open-source, custom, CMS, LMS, etc.
  • Online community strategy
  • Agile development and product strategy

Because SXSWedu did such a great job of collecting a roster of exceptional mentors, I wondered if anyone would sign up to meet with me. So a few days before the conference, I wrote a SXSWedu staff member to inquire, and to my surprise a few people signed up to meet! I emailed them individually to say hello, and ask what they wanted to talk about so I could do some pre-thinking. A couple responded, which later made our short conversations that much more focused.

SXSWedu assigned me to a one hour time slot on Monday beginning at 5:00 PM. When I arrived (30 minutes early, as requested), I sat at a two-seat rounder table. When the first person arrived, a SXSWedu volunteer brought him to my table for our 10 minute chat (which flew by!) To keep everything on schedule, a volunteer indicated when we had 2 minutes left, and when we finished she brought out the next person waiting. Rinse and repeat for the next hour.

In retrospect

The conversations I had with each person were quick, but genuine. Every person asked a question related to the topics listed on my profile, so nothing hit me out of left field. In retrospect I truly feel I relayed at least one nugget of helpful information to every mentee. And while that alone instilled a sense of accomplishment, it turns out this experience morphed into an excellent networking opportunity. In fact, in a couple instances the other person and I decided to meet again after our 10-minute session to continue our conversation, which also led to ongoing email conversation. The mentor experience is an excellent opportunity to build relationships, and at such a large conference I love the chance to purposefully do so while helping others.