Setting up your own VPN server on Ubuntu Server

There’s a few steps involved to get this working, but this article covers all you need to get a VPN server running on Ubuntu:

https://help.ubuntu.com/12.04/serverguide/openvpn.html

 

To configure a Windows VPN client, I used the OpenVPN windows client, but removed these sections from the example client config file based on other article posts related to some errors I was getting. First, removing these lines removed the userid/password prompting which I didn’t need because I was using certificates:

auth-user-pass
auth-retry interact

Then this section was causing the client to hang during extablishing the connection – removing these lines got it working for me:

management 127.0.0.1 1194
management-hold
management-query-passwords

Executing multiple commands with sudo

Some commands won’t execute under sudo (e.g. source on Ubuntu), so to execute these commands, or to execute many commands, use ‘sudo -s’ to get a shell session as the root user, then everything you execute after that point until you exit will be under sudo.

Controlling Services on Fedora

Fedora uses the servicectl utility to enable/disable and control services.

To use:

sudo servicectl status servicename
sudo servicectl enable/disable servicename
sudo servicectl start|stop servicename

Updating/adding kernel headers to Fedora to support VirtualBox Guest Additions

Installing VirtualBox Guest Additions on Fedora 16 and 17 fails because it looks like the kernel headers are not installed by default. After you’ve installed Fedora to VirtualBox, you can manually install the required kernel headers with these steps (summarized from this post)

sudo yum -y update kernel
sudo yum -y install kernel-devel kernel-headers dkms gcc gcc-c++

Reboot then install the VirtualBox Guest Additions from the Devices menu.