Roll Your Own VPN

Everyone has heard the term VPN, but many do not understand why they came about, how they work, or how to set one up. They are useful for more than just watching country-specific streaming video. Luckily, Devil is here to bring light to the whole rotten affair. The Origins of VPN The concept of a VPN (Virtual Private Network) was introduced by Microsoft in the mid-90s with their PPTP (Peer to Peer Tunneling Protocol). [Read More]

Receiving Email

In Sending Email, we learned how to get email from our server and onto the Internet using Mailgun. Now we will learn how to receive and store email. Luckily I covered a lot of the technical aspects of email deliver in that post, so this one will be more straightforward. Why Bother? Porkbun provides free email forwarding for up to five users, so why not just use that? For low-volume personal uses this is a fine solution. [Read More]

Sending Email

In Project: Virtual Private Server, we leveraged our existing Linux skillset to build a VPS, install a WordPress stack on it, point our DNS appropriately, and establish an SSL certificate to secure traffic to and from our new website. Awesome! There’s one more thing you’ll need for any modern website — email. If you’re planning to interact with your users, you need a way to get messages to and from them. [Read More]

Project: Virtual Private Server

In Virtual Machines, I introduced the concept of a virtual machine (VM). To introduce you to Linux, I recommended and showed how to create a dedicated VM to install Ubuntu Linux. I didn’t get into the weeds of the host machine, because early explorations of the file system and CLI would not be bottlenecked by the host machine’s power. Then I laid out a series of posts (#1, #2, #3) illustrating Docker as a specialized tool to deploy containerized applications quickly and easily. [Read More]

Introduction to Shell Scripting

In Text Streams and Redirection, I went over some helpful CLI tools and shell operators to manage text streams. It’s all well and good to see examples of grep and tr, but it doesn’t give a full sense of how powerful the shell environment actually is. I recently wrote a script to help me automate a very tedious task, and I thought it would be useful to break it down here. [Read More]

Introduction to DNS

In the last post, we learned how to manage incoming traffic to your server using a reverse proxy. But how does that traffic reach your server in the first place? I made some opaque references to DNS records, but otherwise skipped over the concept. We’re going to get into it now. We have to nerd out a bit first, though. What is TCP/IP? The most common transport protocol on the Internet is TCP (Transmission Control Protocol), delivered over a network protocol called IP (Internet Protocol). [Read More]

Reverse Proxies

In the last post, we explored the idea of grouping and isolating related containers into separate networks. Isolation of services is inherently part of working with Docker, and a major reason why it’s so successful. Savvy admins cian use this to their advantage, reducing the attack surface of mission-critical applications. If you can control how traffic gets into your containers, you minimize the ability for compromise. If you are operating an Internet-facing server, odds are good that you’re exposing more than one service. [Read More]

Advanced Docker

In the last post, we learned how to assemble a multi-container stack to serve a single web application (WordPress). This post will complete our Docker-specific exploration, and future posts will build upon the skills we’ve learned here. We will: Organize Docker application stacks on the file system Isolate application stacks with dedicated networks Discuss best practices for image versioning Discuss running a stack in the console vs. detaching Discuss update mechanisms (automatic vs. [Read More]

Building Docker Stacks

In the last post, we spent a long time talking about containers and celebrated with a very simple nginx web server setup. In this one, we will delve into some intermediate topics and learn how to: Define containers with a text configuration file, instead of individually on the command line Change container behavior with environmental variables Define dedicated volumes for persistent storage Connect multiple containers to build a web application The Web Stack In the early days of web hosting, it was common to see the LAMP acronym, which represents Linux, Apache, MySQL, and PHP. [Read More]

Introduction to Docker

We learned about virtual machines earlier, which will give you a decent foundation for containers. The virtual machine approach is wonderful when you want to maintain strict separation between different operating systems. It dedicates storage, memory, and CPU to the VM, so that “power” is effectively taken from the host OS. The guest OS (inside the VM) runs its own complete stack, from the kernel all the way up to the user interface components. [Read More]