In order to connect to firewall and DRACs of our new Rackspace cluster, I had to setup a VPN connection. Rackspace gave us a Cisco ASA device which is firewall and vpn in one. In order to connect to the VPN the client needs to do 2-factor authentication.

At first I tried to install the necessary add-ons for Ubuntu’s network-manager, but after I spent an hour or so trying to make it work, I took an alternate route.

Requirements

Here’s all you need to get started:

Configuration

Create a configuration file — I called mine rackspace.conf:

I put in the following:

Obviously, the capitalized values need to be replaced:

  • IPSec gateway: the VPN’s gateway/address
  • IPSec ID: the group’s name
  • IPSec secret: the group’s password
  • Xauth username: the username
  • Xauth password: the password associated with the username

If you’re with Rackspace, they’ll tell you those exact things when the firewall is provisioned. I gather other ISPs call them similar.

Using your VPN

Once the file is saved, just start the vpn connection:

Note: Just rackspace is plenty, not rackspace.conf or similar.

Testing:

To disconnect it:

Fin

That’s all.