xyzio

Archive for the ‘Linode’ Category

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

Free Bingo Card and Wordsearch Designer

leave a comment »

If you are looking for a free Bingo Card or Wordsearch Designer then look no more – BingoWords Puzzle Designer is now free for everybody!  Click here to go to the website!

Features:

  • Create arbitrary sized Wordsearch puzzles
  • Create Bingo Cards up to 5×5 squares in size
  • Save your wordlists for future use and to share with co-workers
  • Print an unlimited number of Bingo Cards and Word Search Puzzles
  • Print up to 8 Bingo Cards per page
  • Quick access to common word lists using the built in Word Wizard

For more details, read on.

Why is it Free?

Originally, I was planning to sell Bingo Words Puzzle Designer but then I realized that I’d rather spend my free time working on new code instead of on marketing and all the hassle that comes with running a business.  Besides, putting together something like this only took me a couple weeks of part-time work and it annoys me that some people are charging over $30/copy for something that is this simple to make.

My hope is that it will be useful to someone and that they will pay it forward some day.

About

BingoWords Puzzle Designer is a project I worked on in order to teach myself C#/ASP.NET.  The application is made with C# and Winforms.  The website is build using ASP.NET and is hosted using Mono on a  virtual server at Linode.  I was able to learn every aspect of creating an app with this project – from drawing on the screen to printing and to saving files to generating serial numbers.

Feel free to contact me with questions or suggestions for improvement!

Written by M Kapoor

February 19, 2010 at 4:06 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 , , ,