xyzio

Posts Tagged ‘Linode

Private Internet Access OpenVPN on Ubuntu at Linode or Digital Ocean

with one comment

Update 9/14: These instructions no longer seem to work at Linode.  Please leave a message in the comments if you see a mistake in my directions.

I’ve written about using Apache to proxy connections over SSH in order to hide sensitive information in public places. For an extra fee you can gain additional anonymity on the internet via companies like Private Internet Access which provides multiple VPN gateways for around $40/year without the risk of hacking or mis-configuration that comes with doing your own setup.  You also get the ability to use VPNs in multiple countries and US locations thus further obfuscating information.

Private Internet Access has instructions on how to set up a VPN on Ubuntu using Network Manager.  However I’m using a server install at Digital Ocean and I don’t feel like installing the desktop just to use Network Manager.  In addition there is setup required to allow you to access the VPS while still routing outgoing data through the VPN.  This should also work at Linode. Here is how to do it:

1) Install open-vpn : apt-get install network-manager-openvpn

2) Download a copy of Private Internet Access’ config files or if their site is down, here.  Unzip the files in a new directory.  The zip file contains everything you need to access their VPN servers without dealing with Ubuntu’s Network Manager.

3) Now you configure your VPS so that any traffic that comes to the VPS is responded to by the VPS.  Otherwise once you start your VPN any attempt to connect to the VPS will be answered through the VPN which is not what the connecting software expects.

Type this at the prompt:
ip rule add from x.x.x.x table 128
ip route add table 128 to y.y.y.y/y dev ethX
ip route add table 128 default via z.z.z.z

Where x.x.x.x is your public IP y.y.y.y/y is the subnet of your public IP address ethX is your public Ethernet interface z.z.z.z is the default gateway To get the x, y, and z use ip route: ip route show. The last three lines of the output will look something like this:

93.115.84.202 via 127.0.0.1 dev eth0
128.0.0.0/1 via 10.155.1.5 dev tun0
127.0.0.0/24 dev eth0 proto kernel scope link src 127.0.0.1

Match the color coded output to the ip commands above.  You need to type these in every time you restart your VPN so it helps to save them in a shell script.

4) Optional: Create a password file.  You can create a password file to supply OpenVPN with your login info If you are lazy and don’t feel like entering a password every time you connect to Private Internet Access.  To do this, make a file that contains your username on the first line, password on the 2nd line, and nothing else.

5) Start OpenVPN using one of the config files from step 2.  Each config file is set up to connect to one of the VPN servers run by Private Internet Access.  You can specify your password file from step 4 using the auth-user-pass argument.  Here is what I use to connect to their Romania server:

openvpn –config Romania.ovpn –auth-user-pass password_file

Finally, check your IP using their ‘Where’s My IP‘ page.

Questions or comments?  Feel free to leave a message using the comments box below.

Sources:
http://openvpn.net/index.php/open-source/documentation/howto.html#client
http://www.cyberciti.biz/faq/how-to-find-out-default-gateway-in-ubuntu/
https://forum.linode.com/viewtopic.php?t=8737
https://www.privateinternetaccess.com/pages/client-support/#ubuntu_openvpn

Written by M Kapoor

June 27, 2013 at 7:25 pm

CrystalTech Web Hosting Review

leave a comment »

I was looking for ASP.NET hosting for the project I built to learn C#/ASP.NET.  CrystalTech isn’t the cheapest host or gives the most features for your dollar but I decided to sign up because it is the host used and recommended by Jeff Atwood.

Background

I signed up for the .NET Value plan at $7.95/month.  I got the following for my $7.95/month:

  • Hosting for 1 site only
  • 500 MB disk space
  • 50 GB bandwidth
  • 2 GB mail disk space
  • 10 mail accounts
  • 100 MB MySQL database

I paid for 3 months in advance so I didn’t have to pay the setup fee.  I was a member from July 2008 through February 2009.

Sign-up

Signing up was easy.  I filled out the online form, entered my credit card number, and they started on setting up my account.    I finished applying at 8:18PM and had my account information at 8:58PM on the same day.

Control Panel

CrystalTech’s control panel is the worst I have used.  They make you log in with a hard to remember customer number instead of a easy to remember user ID.  Instead of giving you a overview of your site, the main control panel page is a massive advertisement for their services.  I am logged in now and I see ads for Paypal and virtual servers – and this is for a service that I’ve paid for!  Even worse, the control panel has poor support for non-IE browsers, I cannot access any of the settings in the control panel with my daily browser – Opera.

Hosting

Visual Studio has a great GUI for transferring websites and I was easily able to use it to upload my files after I managed to set up a FTP account.  Their uptime isn’t too great, I get maintenance notifications 1-2 times a month alerting me that my site will be down for a couple hours.  Their last downtime notification was about 2 weeks ago, compare this with my linode virtual server that has been up for 46 days!

Account Cancellation

Unlike all the other hosting companies I have used, CrystalTech makes you call in to cancel your account.  Canceling online is not allowed.

Final Thoughts

I was very disappointed with CrystalTech’s hosting experience.  Their constant downtime, poorly designed control panel, and ads are a pain.  In addition, they’ve graciously decided to spam me with their monthly newsletters.  Their poor service is apparent when a little while after I signed up, they lost all the data that Jeff Atwood had stored on their servers.

Since then, I’ve moved my site to Linode and set it up to serve ASP.NET pages using Mono.  For about $12 more (1.5x more), I get a shell account, dedicated memory, 4x more bandwidth, 32x more disk space, and the ability to host unlimited websites.  I would not recommend CrystalTech as a host.

Written by M Kapoor

February 18, 2010 at 5:34 am

Getting Mono Working at Linode on Ubuntu 9.10

leave a comment »

I’m looking into moving one of my ASP.NET projects to Mono and had trouble getting Mono working on Ubuntu 9.10. Turns out the steps to set it up were simple, but they took some digging around so here they are:

Step 1:

Install Apache2:
apt-get install apache2 apache2.2-common apache2-mpm-prefork apache2-utils libexpat1 ssl-cert

Step 2:

Enable the Universe repositories. To do this, uncomment the universe repositories in /etc/apt/sources.list so it looks like this:

## main; restricted repositories
deb http://us.archive.ubuntu.com/ubuntu/ karmic main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic main restricted

deb http://security.ubuntu.com/ubuntu karmic-security main restricted
deb-src http://security.ubuntu.com/ubuntu karmic-security main restricted

## universe repositories
deb http://us.archive.ubuntu.com/ubuntu/ karmic universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic universe

deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe

deb http://security.ubuntu.com/ubuntu karmic-security universe
deb-src http://security.ubuntu.com/ubuntu karmic-security universe

Step 3:

Run ‘apt-get update’ to get the latest sources.

Step 4:

Finally, follow the steps listed in the Ubuntu ModMono guide:

Install the mod_mono packages: libapache2-mod-mono mono-apache-server2-
apt-get install libapache2-mod-mono mono-apache-server2

Enable the Apache module:
a2enmod mod_mono_auto

Restart Apache:
apache2ctl graceful

Step 5:
Place a .aspx page where Apache can see it, for example at ‘/var/www/’

Written by M Kapoor

January 2, 2010 at 10:03 pm

Posted in ASP.NET, hosting, Linode, Mono

Tagged with , , ,