Background With LVM, the preferred way of adding storage space to a computer running a Linux-based operating system seems to be to add disks, judging by my search results. Naturally, this is a great way of minimizing disruption in a physical machine, but what if you’re running your machines virtually? Adding virtual disks tends to… Continue reading Resizing the system volume on a Linux VM
Category: Linux
Test whether a git pull is needed from within a batch script
Just a quick hack I did to avoid having to sync a couple of scripts unnecessarily when deploying my load balancers. Underlying idea stolen from a post by Neil Mayhew on Stackoverflow. Shell session script: #!/bin/bash UPSTREAM=${1:-‘@{u}’} LOCAL=$(git rev-parse @) REMOTE=$(git rev-parse “$UPSTREAM”) BASE=$(git merge-base @ “$UPSTREAM”) if [ $LOCAL = $REMOTE ]; then GIT_STATUS=nochange… Continue reading Test whether a git pull is needed from within a batch script
Environment variables for services in a systemd-based system
My current config deployment automation project has required me to set up a dev/staging environment for my load balancers, since I don’t want to break stuff by deploying untested configurations. This environment is functionally identical to a single load balancer and can be used along with a hosts file on a client to not only… Continue reading Environment variables for services in a systemd-based system
Continuous Deployment of Load Balancer Configurations
I thought I’d describe some optimizations I’ve made to my load balancers at work, both for the good of the older me, and in case someone would benefit from some of my ideas. Background The load balancers are based on four software packages that integrate to create a powerful whole: Keepalive Daemon provides a common… Continue reading Continuous Deployment of Load Balancer Configurations
Load Balancing Exchange 2016 behind HAProxy
I recently started the upgrade to Exchange 2016 at work. A huge benefit over Exchange 2010, is that REST based client connections are truly stateless. In effect this means that if a server goes down, clients shouldn’t really notice any issues as long as something redirects them to a working server. In my system, this… Continue reading Load Balancing Exchange 2016 behind HAProxy
SFTP revelations
I got myself into a situation where I had to copy some files from my computer to a server that presented sftp but not scp. Since I’ve never needed to use the sftp protocol from a cli-only machine, I haven’t really thought about how it works in non-interactive mode. Batch mode allows you to create… Continue reading SFTP revelations
Securing an Internet accessible server – Part 3
This post is part of a series. Part 1, Part 2. In the last part I briefly mentioned load balancers and proxies. After thinking about it for a while, I realized I see no reason not to run one, since it simplifies things a bit when setting up secure web services. In this part, we… Continue reading Securing an Internet accessible server – Part 3
WordPress behind HAProxy with TLS termination
My current project has been to set up a publicly accessible web server with a decent level of security. It has been an interesting exercise in applying “old” knowledge and gathering some new. This weekend I finished this project for now. The current setup is as follows: Behind my firewall, where I NAT port 80 and… Continue reading WordPress behind HAProxy with TLS termination
Securing an Internet accessible server – Part 2
In part 1 we made it significantly harder to gain access to our server once it is opened up to the Internet – but we’re not quite ready for that yet. In this post we’re exploring a firewall in Ubuntu, ufw, which stands for “uncomplicated firewall”, and we’ll set up some additional hardening using Fail2Ban to protect ourselves… Continue reading Securing an Internet accessible server – Part 2
Securing an Internet accessible server – Part 1
This article is part of a series. Part 2. Let’s look at a simple scenario, and see how common tools in the Linux and BSD world can help us: We want to be able to remote control a server from wherever in the world, but we really don’t want others to be able to log… Continue reading Securing an Internet accessible server – Part 1