Install and configure PowerDNS with geo backend (CDN/geographic DNS blancing)

The Geo backend can be used to distribute queries globally using an IP-address/country mapping table, several of which are freely available online or can be acquired for a small fee.

This allows visitors to be sent to a server close to them, with no appreciable delay, as would otherwise be incurred with a protocol level redirect. Additionally, the Geo backend can be used to provide service over several clusters, any of which can be taken out of use easily, for example for maintenance purposes.

The Geo backend is in wide use, for example by the Wikimedia foundation, which uses it to power the Wikipedia global load balancing.

This tutorial has been tested on Debian 7.x (wheezy).

1. Install PowerDNS server and the Geo backend

apt-get install pdns-server pdns-backend-geo
Continue reading

How to detect if your server is vulnerable to the Shellshock bug and fix it

Shellshock vulnerability is a security bug affecting Unix/Linux operating system through the bash shell. Disclosed on September 24 2014, it has been rated 10 (the maximum score) for severity by NIST. Debian installs bash by default so you’re probably affected!

To check if your server is vulnerable, run this command:

env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
Continue reading

How to detect if your server is vulnerable to the Heartbleed OpenSSL bug and fix it

HeartbleedThis is a serious bug affecting a lot of servers including Debian Wheezy. Act fast because everything is being scanned and information is being leaked right now!

The Heartbleed Bug is a serious vulnerability in the popular OpenSSL cryptographic software library. This weakness allows stealing the information protected, under normal conditions, by the SSL/TLS encryption used to secure the Internet. The Heartbleed bug allows anyone on the Internet to read the memory of the systems protected by the vulnerable versions of the OpenSSL software. This compromises the secret keys used to identify the service providers and to encrypt the traffic, the names and passwords of the users and the actual content. This allows attackers to eavesdrop on communications, steal data directly from the services and users and to impersonate services and users.

It’s really easy to use to bug to steal information from affected systems without having any access to it or the network. To check if your server is infected and see what information it is exposing you can use this python script:

To use the script, make sure you have python installed and run the following command:

Continue reading

How to add a new hard disk or partition using UUID and ext4 filesystem

Adding a additional hard disk to your workstation or server is easy and often required. Here’s we’ll step through the process of identifing the newly attached drive, prepare and mount it by referencing UUID which is a preferred method today.

If you have just added a virtual disk to a virtual machine, make sure you restart the virtual machine before mounting the new disk.

1. Figure out the device name for the new device

fdisk -l
Continue reading

How to install Nginx with PHP and MySql support on wheezy

Nginx is an open source reverse proxy server, load balancer, HTTP cache, and a web server. The Nginx project started with a strong focus on high concurrency, high performance and low memory usage. Users have been moving to Nginx because of the high performance and stability and as of February 2014, Nginx is hosting around 15% of all web servers according to Netcraft’s Web Server Survey.

In this tutorial we’ll cover install and configuring Nginx, PHP (with PHP-FPM) and MySql server.

1. Install MySql server

apt-get install mysql-server
Continue reading

How to install ownCloud on wheezy

ownCloud gives you universal access to your files through a web interface or WebDAV. It also provides a platform to easily view & sync your contacts, calendars and bookmarks across all your devices and enables basic editing right on the web.

1. Add the ownCloud repository as apt source

echo 'deb /' >> /etc/apt/sources.list.d/owncloud.list
Continue reading

How to install DirectAdmin on squeeze

DirectAdmin is a web hosting control panel providing a graphical interface and automation tools to simplify server and account management. Features include: E-mail, FTP, DNS and web management, Statistics, Apache configuration, User and reseller management and more.

Before you install DirectAdmin, make sure you have a fresh installation of Debian 6 (squeeze), either 32 or 64 bit. This tutorial is only tested on squeeze but it should also work on Debian 4 and 5. Continue reading

How to install VMware tools on wheezy

The VMware Tools package adds drivers and utilities to improve the graphical performance for different guest operating systems, including mouse tracking. The package also enables some integration between the guest and host systems, including shared folders, plug-and-play devices, clock synchronisation, and cutting-and-pasting across environments.

Note. When installing VMware tools on wheezy running older versions of VMware ESX/ESXi you may have some issues because of missing modules. This may be fixed with patches but another option would be to use open-vm-tools as an alternative. Here’s a tutorial on how to install open-vm-tools: How to install Open Virtual Machine Tools (open-vm-tools) on squeeze/wheezy

1. Install kernel headers and tools required to compile and install VMware tools:

apt-get install binutils cpp gcc make psmisc linux-headers-$(uname -r)
Continue reading

How to install Open Virtual Machine Tools (open-vm-tools) on squeeze/wheezy

The Open Virtual Machine Tools (open-vm-tools) are the open source implementation of VMware Tools. They are a set of guest operating system virtualization components that enhance performance and user experience of virtual machines.


Installing open-vm-tools is very easy on wheezy, just install the package using apt-get and reboot the machine when completed.

apt-get install open-vm-tools
Continue reading