Connect to VyprVPN using PPTP on Ubuntu Server

Configuration

Install pptp client

apt-get install pptp-linux

Create a new config file. Let’s put the name as jp1.vyprvpn:

vi /etc/ppp/peers/jp1.vyprvpn

Insert below content and save. Replace EMAIL with your login to VyprVPN. In this example, I use Japan server for the remote location (jp1.vpn.goldenfrog.com). You can replace to any server from this list https://www.goldenfrog.com/support/vyprvpn/vpn-setup/linux/pptp

pty "pptp jp1.vpn.goldenfrog.com --nolaunchpppd"
lock
noauth
nobsdcomp
nodeflate
name EMAIL
remotename jp1.vyprvpn
ipparam jp1.vyprvpn
require-mppe-128
usepeerdns
defaultroute
persist

Now edit /etc/ppp/chap-secrets file and insert your EMAIL and PASSWORD:

# Secrets for authentication using CHAP
# client server secret IP addresses
EMAIL jp1.vyprvpn PASSWORD *

Create and insert below content to /etc/ppp/ip-up.local

#!/bin/bash
H=`ps aux | grep 'pppd pty' | grep -v grep | awk '{print $14}'`
DG=`route -n | grep UG | awk '{print $2}'`
DEV=`route -n | grep UG | awk '{print $8}'`
route add -host $H gw $DG dev $DEV
route del default $DEV
route add default dev ppp0

Add execution permission to the file:

chmod +x /etc/ppp/ip-up.local

Run

Now, start and connect pppd client to remote server:

pon jp1.vyprvpn

to stop type

poff jp1.vyprvpn

Install latest Docker on Ubuntu 14.04

This is a quick and simple way to install latest Docker. You need to instal in 64 bit machine otherwise you will receive an error  “E: Unable to locate package lxc-docker”

su root
sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
sh -c "echo deb http://get.docker.io/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list"
apt-get update
apt-get install lxc-docker

For more information please browse to http://docs.docker.com/installation/ubuntulinux/

Create a subdomain (Apache2)

Let’s say you have a domain mywebsite.com and you want to add a subdomain blog.mywebsite.com. Here’s how to do it.

Create an apache config file:

touch /etc/apache2/site-available/blog.mywebsite.com
vi /etc/apache2/site-available/blog.mywebsite.com

Insert this configuration:

<VirtualHost *:80>
	ServerAdmin webmaster@localhost

	DocumentRoot /var/www/blog.mywebsite.com
	<Directory />
		Options FollowSymLinks
		AllowOverride All
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Enable the new config

a2ensite blog.mywebsite.com

Put all files under /var/www/blog.mywebsite.com and done!

P/S : To remove a subdomain, run :

a2dissite blog.mywebsite.com