How to Install OpenVPN on a VPS

How to install OpenVPN on a VPS

In this guide we will be installing ‘OpenVPN Access Server’ onto a VPS.

1. Get a VPS

You are going to need a VPS with full root access. You can get one here.

In our guide we will be using a 512MB VPS running ‘Ubuntu 14 64bit’ as our operating system. If you choose to use a different operating system, the commands in the “Installation” section will be slightly different.

1. Prepare the server

Connect to your VPS using SSH.

Make sure that TUN/TAP is enabled on your VPS. With some providers, you can enable this feature directly in the Server Control Panel with a single click. Just allow time for the VPS to reboot with the new feature enabled. Then, run the following command:

cat /dev/net/tun

If you get a result that looks like this:

/dev/net/tun: File descriptor in bad state

You are all set. “File descriptor in bad state” tells you that TUN is enabled. If you get a different result, TUN may not be enabled on your VPS. Try again or contact your provider so they can check.

Now, lets make sure that iptables is running on your server:

iptables --list

It should be running already by default, however if for some reason you get an error or not found result back, you can try installing iptables manually:

apt-get install iptables

Continue reading

How to Setup a SeedBox

How to setup a SeedBox on a linux VPS

In this guide we will be setting up a SeedBox (for BitTorrent downloading) on a Linux VPS in just four easy steps.

1. Get a VPS

First, you will need to get a VPS (virtual private server) to host your SeedBox.

In this guide we will be using a SecuredSpeed VPS (their 512MB plan specifically) however, this guide should work with any good VPS provider. Our VPS comes with a dedicated IP, 20GB of storage space (plenty to download even a large 1080p video), and a fast gigabit network connection for under $5/month.

We will be running Ubuntu as our VPS operating system (the script below was written to work with Ubuntu or Debian). Once your order is placed and paid for, you should get an email from your VPS provider with your server login details (specifically your Dedicated IP and initial root password). Make a note of these details.

2. Setup your VPS

Before we can start our VPS setup, we need to connect to our VPS via the SSH protocol so that we can control it and enter commands.

Grab an SSH client like PuTTY (direct download link for Windows here). If you’re running MacOS or Linux on your local system you don’t need an SSH client like PuTTY, you can just connect to your VPS using terminal:

ssh [email protected]

If you are using PuTTY to connect, just plug in your dedicated IP, port 22, and click open/connect. You will then be asked for your username (use ‘root’) and your password (use the root password that you got from your VPS provider).

Now that we are connected to the VPS, we can grab and run our VPS SeedBox setup script:

wget --no-check-certificate https://github.com/bariscimen/transmission-installer/raw/master/transmission.sh && sudo bash transmission.sh

The script will ask you where you for a username and password as well as locations for where you want the downloaded files to go.

Let the script run until it is finished.

Continue reading

Virtuozzo/OpenVZ vzctl Commands

Useful vzctl commands for your server:

List all VM’s

vzlist -a

Shutdown a specific VM

vzctl stop CTID

Shutdown all VM’s on a node

for ctid in 'vzlist -Ho ctid'; do vzctl stop $ctid; done

Boot a specific VM

vzctl start CTID

Boot all VM’s on a node

for ctid in 'vzlist -Ho ctid'; do vzctl start $ctid; done

Restart a specific VM

vzctl restart CTID

Continue reading