How To Stream MP4 Video Files From My VPS

This is a really good question and was actually the subject of a support ticket. I scratched my own head for a second and realized the solution was much easier than I thought.

What you need:

  • A virtual private server running Windows or Linux
  • A web server such as Apache, IIS, nginx, Lighttpd, etc.
  • Enough disk space for the operating system and video files
  • Enough bandwidth for your video files

Step One:
Install the operating system

This is relatively easy and I have to assume everyone has done this as there is nothing specific or special you need to install on your operating system except make sure it connects online.

Step Two:
Install the web server

For Apache, it’s relatively easy with most Linux operating systems.

Apache download pageApache for Windows
Continue reading “How To Stream MP4 Video Files From My VPS” »


Ubuntu: Setting Up a PPTP On Ubuntu VPS

This is a common request and relatively easy to accomplish. Usually, you will need a Xen or KVM VPS to load the necessary kernel modules. If you don’t want to spend too much money, get a custom Xen VPS with a VPS hosting company.

You need about 256mb of RAM and 512mb of swap, one CPU and whatever bandwidth you need. 5 – 10gb of disk space will do fine for you.

First, we verify the kernel modules:

# lsmod
Module                  Size  Used by
dm_crypt               23125  0

We need various PPP modules so we issue the following commands:

# modprobe ppp_async
# modprobe ppp_deflate
# modprobe ppp_mppe
# lsmod
Module                  Size  Used by
arc4                   12529  0 
ppp_mppe               13077  0 
ppp_deflate            13038  0 
zlib_deflate           27139  1 ppp_deflate
ppp_async              17539  0 
crc_ccitt              12667  1 ppp_async
dm_crypt               23125  0

All our necessary PPP modules are installed, which are required for PPTP so we’re doing very good.

Next, we install pptpd:

apt-get update
apt-get install pptpd

We edit a few files, such as /etc/pptpd.conf and add to the bottom of the file:


We edit /etc/ppp/pptpd-options and uncomment ms-dns to add:


These are Google’s DNS servers. Feel free to add your VPS hosting company’s resolvers, a third party DNS server like OpenDNS or even your own DNS servers.

We add our account now by opening up /etc/ppp/chap-secrets:

# client    server  secret          IP addresses
testacct    pptpd   vpn1234    *

The username “testacct” has the password “vpn1234″. You would want to create something more secure than using this. We have to configure NAT for PPTP with the following line added to /etc/rc.local but right before exit 0 in the file:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

If you do not add this line to /etc/rc.local, your connection will not connect to the Internet.

This is what your /etc/rc.local file should look like:

#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
exit 0

Next, we have to edit /etc/sysctl.conf and find this line net.ipv4.ip_forward=1 and make sure there is not a # in front of it which disables it. We have to “uncomment” it.


We reload the configuration with sysctl -p and reboot our Xen VPS server from the command like with the reboot command.

To make this work on my Ubuntu laptop, I went to the network icon at the top right hand corner and went to VPN Connections -> Configure VPN.

I clicked Add, then chose Point-to-Point Tunneling Protocol (PPTP) at the next screen.

You need to fill in the following settings:
Gateway = Your VPS IP address
Username = testvpn
Password = 1234vpn (or whatever you changed user/password to)

We click the Advanced box, and enable Use Point-to-Point encryption (MPPE) or you will have errors when trying to use your PPTP VPN. I had this problem for a long time and was glad it was a simple setting to enable to get it working.

PPTP works fine on Android based devices. This PPTP VPN worked flawlessly on my Samsung Replenish cell phone running Android Gingerbread. It allowed my web browsing to go through the VPN and when I verified my IP address, it gave the IP address of the VPN.

Like I mentioned above, it’s relatively inexpensive and very simple to setup on a Xen VPS server. You can email a hosting provider to see if these kernel modules are available on OpenVZ but this setup works on a Xen VPS 100% of the time. If the price of Xen scares you, get a custom Xen VPS with the following specs:

  • 1 CPU core
  • 256mb RAM
  • 512mb swap
  • 5gb disk

Get whatever bandwidth you need and since bandwidth is cheap, you won’t really need a lot. 500gb – 1TB should be more than enough bandwidth for you, depending on how many people you have on this PPTP VPN.

If you are trying to get your coworkers, friends and family to browse a little bit more securely on the Internet, if you use the Internet a lot on unsecure networks or coffee shop wireless Internet connections this is really recommended as an extra layer of encryption on an otherwise unsecure to the point of anyone with some minor technical knowledge can monitor who goes to what website and can even get information that you think is SSL encrypted.


VPS OS: Which Linux Distribution is the Best?

There are sometimes overwhelming options for an operating system with virtual private servers and here is some information that may be useful for you to choose, if you are unsure, and some of the pros/cons of the operating system.

CentOS, short for Community ENTerprise Operating System (CentOS), is a fully Redhat / RPM compatible operating system but is community supported, not commercially supported like Redhat. This means the development team works together, takes input and patches from the Linux community and releases it.

The advantage of CentOS is that if you are transitioning from Redhat to CentOS or have a Redhat requirement, that CentOS will be 100% compatible with your requirement of a Redhat operating system.

I have ran CentOS for projects and I like it, if it’s a requirement, but since I was “raised” on Debian Linux I prefer it. However my personal opinion should not sway you from trying out CentOS.

There are a lot of blogs and websites dedicated to CentOS, the operating system is well documented, and the yum package manager is very easy to run, maintain and upgrade a virtual private server which is a big plus.

Debian, named after Debra and the creator of Debian Ian Murdock (Deb + Ian), is a popular and widely used distribution of Linux. Debian has over 29,000 maintained packages available for download by their users and this operating system can run on a variety of hardware. Also, Debian can run the Linux kernel and the FreeBSD kernel. Debian running the FreeBSD kernel is called GNU/kFreeBSD.

The advantage of Debian is that it’s stable, actively developed by enthusiasts and developers, has over 29,000 actively maintained packages available for download from the apt repositories, and the package maintainers prefer stability over “latest release” software which may have bugs and could compromise the stability of the Debian server.

A disadvantage is a lot of folks who want the “latest release” of software find it’s unavailable and they have to use third party apt repositories, such as from the developer themselves or from third party repositories like DotDeb. This is generally why Debian users move from Debian over to Ubuntu, which is 100% compatible with Debian but the repositories are more up to date for the folks who want latest releases of software.

Ubuntu, or as I like to say “Debian’s cousin”, is based on Debian and uses the apt package/repository system but is more “cutting edge” and “up to date” than it’s Debian cousin.

Debian software will generally run on Ubuntu and vice versa.

The advantage, as I previously explained with Debian, is the software and repositories are updated, cutting edge, but could compromise stability if a package is not thoroughly tested by package maintainers or the developer of the package themselves.

I have not seen an issue from latest release software being buggy, but this is just a theory that could happen.

I run Ubuntu on my laptop and enjoy it tremendously as “latest release” packages will fix stability issues on desktop hardware which uses more software and packages than a virtual private server who may just run the minimal base operating system, a webserver, PHP programming language, etc.

The disadvantage? Ubuntu is just as solid as a desktop operating system as an operating system for servers and virtual private servers. I’ve never had an issue with packages, compatibility or stability with an Ubuntu operating system. Actually I have one Ubuntu based virtual private server with over 200 days of uptime.

I have only mentioned 3 operating systems, such as CentOS, Debian and Ubuntu, because I only have experience with those operating systems. However in all fairness, I am going to start using and testing other operating systems in a virtual private server environment to give all operating systems a chance and report back to you.


How to Install rTorrent/ruTorrent Seedbox on Ubuntu VPS

This tutorial will guide you through the installation of libtorrent 0.13.0, rTorrent 0.9, and the ruTorrent Web UI (3.0) on a Debian or Ubuntu system. It has been tested with Debian 6 (x64) and Ubuntu 11.04 (x64).

To begin, access your VPS via SSH and run the following to update your platform and install some needed dependencies:

# apt-get update

# sudo apt-get install subversion build-essential automake libtool libcppunit-dev libcurl3-dev libsigc++-2.0-dev unzip unrar-free curl libncurses-dev

# apt-get install apache2 php5 php5-cli php5-curl

Enable scgi for Apache:

# apt-get install libapache2-mod-scgi

# ln -s /etc/apache2/mods-available/scgi.load /etc/apache2/mods-enabled/scgi.load

Install XMLRPC:

# mkdir /install;cd /install

# svn checkout http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/stable xmlrpc-c

# cd xmlrpc-c

# ./configure –disable-cplusplus

# make

# make install

Intall libtorrent:

# cd /install

# wget http://vps6.net/src/libtorrent-0.13.0.tar.gz

# tar xvf libtorrent-0.13.0.tar.gz

# cd libtorrent-0.13.0

# ./autogen.sh

# ./configure

# make

# make install

Install rTorrent:

# cd /install

# wget http://vps6.net/src/rtorrent-0.9.0.tar.gz

# cd rtorrent-0.9.0

# ./autogen.sh

# ./configure –with-xmlrpc-c

# make

# make install

# ldconfig

Create required directories:

# mkdir /home/seeder1/rtorrent

# mkdir /home/seeder1/rtorrent/.session

# mkdir /home/seeder1/rtorrent/watch

# mkdir /home/seeder1/rtorrent/download

Setup .rtorrent.rc file (rTorrent config):

# cd ~/

# wget http://vps6.net/src/.rtorrent.rc

# cp .rtorrent.rc /home/seeder1/

(Edit the settings in .rtorrent.rc, like max upload/download speed, max connected peers, etc, as needed.)

Install rTorrent:

# cd /install

# wget http://vps6.net/src/rutorrent-3.0.tar.gz

# tar xvf rutorrent-3.0.tar.gz

# mv rutorrent /var/www

# wget http://vps6.net/src/plugins-3.0.tar.gz

# tar xvf plugins-3.0.tar.gz

# mv plugins /var/www/rutorrent

# rm -rf /var/www/rutorrent/plugins/darkpal

# chown -R www-data:www-data /var/www/rutorrent

Secure /rutorrent:

# a2enmod ssl

# a2enmod auth_digest

# a2enmod scgi

# openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem

# chmod 600 /etc/apache2/apache.pem

# htdigest -c /etc/apache2/passwords seedbox seeder1

(Enter a password of your choice when prompted, you will use this to log in to the ruTorrent web UI.)

# cd /etc/apache2/sites-available/

# rm -rf default

# wget http://vps6.net/src/default

# a2ensite default-ssl

# /etc/init.d/apache2 reload

Install screen:

# apt-get install screen

Start rTorrent in a detached shell using screen:

# screen -fa -d -m rtorrent

(To start rtorrent automatically after reboots, add the above command to /etc/rc.local)


Setup is now complete! Access ruTorrent at http://xx.xx.xx.xx/rutorrent/ (replace xx.xx with your server’s IP address). You should be greeted with a login prompt, where the username is “seeder1″ and the password is the one you set above in the “secure /rutorrent” section.

VPS6.NET offers plug-n-play ruTorrent seedbox templates that can be setup instantly on any VPS: https://vps6.net/template-rutorrent.php

This article is also available in the VPS6.NET Knowledgebase:





How to Install RapidLeech v42 on Debian or Ubuntu VPS

This guide will walk you through the installation of RapidLeech v42 r358 on a VPS running Debian or Ubuntu.

To begin, log in to your VPS via SSH as the root user, and run the following commands:

# apt-get -y update

# apt-get -y upgrade

Install dependencies:

# apt-get -y install apache2-prefork-dev apache2-utils apache2.2-bin apache2.2-common apache2

# apt-get -y install php5 php5-cgi php5-cli php5-common php5-curl php5-dev php5-gd php5-tidy php5-xmlrpc php5-xsl php5-suhosin php5-mcrypt php5-imap php5-imagick libapache2-mod-php5

Download RapidLeech:

# cd /var/www

# wget http://rapidleech.googlecode.com/files/Rapidleech.v42.r358.zip

Install RapidLeech:

# unzip Rapidleech.v42.r358.zip

# rm -rf Rapidleech.v42.r358.zip

# chown -hR www-data:www-data Rapidleech.v42.r358

# chmod 777 Rapidleech.v42.r358/files

# mv Rapidleech Rapidleech.v42.r358 rapidleech

Restart Apache:

# /etc/init.d/apache2 restart

RapidLeech should now be accessible at: http://xx.xx.xx.xx/rapidleech/

This article is also available in the VPS6.NET Knowledgebase:



How to Setup LAMP on Debian/Ubuntu VPS

LAMP stands for Linux – Apache – MySQL – PHP, a common software stack used on Linux webservers. To install the basics of a LAMP server on a Debian or Ubuntu VPS, simply access your server via SSH and run the following commands:

# apt-get update

# apt-get install apache2

# apt-get install mysql-server

# apt-get install php5 php-pear php5-suhosin

# apt-get install php5-mysql

Finally, restart Apache, and everything should be functional:

# /etc/init.d/apache2 restart


This article is also available in the VPS6.NET Knowledgebase: