Tricks of the Trades

Installing and Using UFW (Uncomplicated Firewall)

Firewall Image


UFW is a popular and convenient firewall configuration tool originating from Ubuntu distributions. It’s a more accessible way of using the iptables program. Which with some of its complexities can be more cumbersome or confusing for newcomers to learn. In reality UFW works as a wrapper for iptables, so is not a firewall in its own right but the iptables firewall in a simpler form. It serves both IPv4 and IPv6 host-based traffic.

In this post are commands containing options/arguments that contain two words and look like this: comment ssh. These extra parts add a comment to the firewall rules generated. If you are using a version of UFW priot to 0.35 you may have to remove these two extra pieces to avoid errors. Please bear this in mind when you come to using these types of commands later on should you receive errors.

Ansible - Inventory Concepts (2)

Ansible Logo


After outlining the initial installation and setup process in Ansible - Installing and Running (1) I’m continuing in this post with a more precise look at how to handle the main hosts file. Specifically how to lay it out and add host variables or group variables to the mix. Dynamic inventory assets and development/production inventory layouts are not covered here and only alluded to or linked to.

Lastly splitting up the variable types and their definitions into their own YAML files is briefly introduced in the final step, and works best for more complex network hierarchies.

Debian 8 (Jessie) VPS Basic Checklist

VPS Image


Here are some base guidelines I follow when setting up a new VPS manually without configuration management. These steps if anything make the system more secure overall and provide a good starting point from which you can setup the services/software’s required for the purpose of the VPS.

All of these steps in this post are from the context of a droplet (VPS) hosted by Digital Ocean using the Debian 8.5 x64 kernel images they use as of the above date.

Docker - Building Images and Docker Hub (5)

Docker Logo


Docker images can be thought of as blueprints and house the software or files required to run your application inside of a container. So far in these Docker posts all container images have been pulled from an online source and no real interaction with the images themselves has been explored.

However in this post we’re taking a very simple Python Flask application and going through the process of dockerising it. Which in non-jargon terms means we are configuring and creating our own custom Docker image, to then run it in a container like any other image. This usually also involves uploading it to Docker Hub for others to pull down and use, so is covered in the guide.

The Docker - Data Volumes and Data Containers (4) post that comes before this one is mostly unrelated so not really a requirement for this post, but still worth checking out overall.

Contributing to GitHub Projects



GitHub is one of the most popular ways to contribute to open-source projects. Many major and minor organisations keep their open-source code-base hosted there, adopting the idea that anyone who follows the rules can have their own efforts put up for consideration. This post talks about said process, which if anything is referred to as “GitHub Flow”.

This information as presented by GitHub is readily available in various forms within their “GitHub Guides” documentation. More specific links to these are listed at the end of the post.

“As of April 2016, GitHub reports having more than 14 million users and more than 35 million repositories, making it the largest host of source code in the world.”